CTCI Chap4 done