ctci problem 8-1