A solution set for CTCI using python version 1