Jet interview question

Basic algorithm questions on a whiteboard.