Solved problems 1.1 and 1.3 from CTCI book