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

UN
Uni24h
0 lượt tải
11
0

Nội dung tài liệu

Trang 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

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

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

Hiển thị 6 trang đầu. Tải tài liệu để xem đầy đủ.

Bình luận (0)

Đăng nhập để tham gia bình luận

Chưa có bình luận nào. Hãy là người đầu tiên!