This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2 ) What is the time complexity? Master Theorem T(n) = 4T(n/4) + O(1) What is the time complexity? Master Theorem T(n) = T(sqrt(n)) + O(1) Can you solve these with the master theorem? T(n) = T(n1) + O(n) Closing Riddle • A bunch of people are living on an island when a visitor comes and tells them that everyone with blue eyes must leave as soon as possible. There is a Fight out every evening at 8 pm. • Every person can see everyone else’s eye color but not their own (and no telling each other. ..) • It’s not known how many people have blue eyes except that at least one person must. • How many days will it take the blue eyed people to leave the island? • Hint: What happens when one person has blue eyes? Do they know? ±rom “Cracking the Coding Interview” (McDowell, 2011)...
View
Full Document
 Spring '08
 Siegel
 Algorithms, Eye color, Recurrence relation, Master Theorem

Click to edit the document details