Solutions to some famous algorithm problems