My thoughts and solution of cracking code interview