complete 35th exercise of code interview.