my solution to some famous algorithm problems