My solution of Cracking The Coding Interview