ch1 problem 5 and 6

added problems 5 and 6 to chapter 1 in cracking the coding interview.