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

UN
Uni24h
0 次下载
11
0

资料内容

第 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

第 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!

第 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); } }

显示前 6 页。下载资料查看完整内容。

评论 (0)

登录 以加入讨论

暂无评论。快来抢沙发吧!