Second-Order Curvature Matrix Computation - Coding problem | OneNoughtOne