Job interview questions from Princeton's Algorithms