CTCI 13.10 2D malloc