Python Solution of Cracking Coding Interview