Implemented few questions from CTCI Chapter 1.