Asymptotic Analysis (Discussion 7) (Phân tích tiệm cận) - Christine Zhou

UN
Uni24h
0 téléchargements
11
0

Contenu du document

Page 3

Announcements - Remember to commit frequently! - HW4 was due yesterday - Proj1 is due this Friday! - Extra OH on Wednesday 6-8PM, Thursday 7-9PM, most likely in the labs! - Extra credit opportunity: Mid-semester survey! Keep your eyes peeled - Advising Sessions: tinyurl.com/cs61b-advising - CS 370 Signups! - Discussion survey: tinyurl.com/disc7cz

Page 5

Practice Problem public void hello(int n) { if (n == 0) { return; } else { for (int i = 0; i < 10000000; i += 1) { System.out.println(“hello”); } hello(n-1); } } Let’s draw the “work done” tree!

Page 6

2 Recursive Running Time There are some typos on the discussion sheet, sorry!! public void andslam(int N) { if (N > 0) { for (int i = 0; i < N; i += 1) { System.out.println(“bigballer.jpg”); } andslam(N/2); } }

Affichage des 6 premières pages. Téléchargez le document pour le voir en entier.

Commentaires (0)

Se connecter pour rejoindre la discussion

Aucun commentaire pour le moment. Soyez le premier !