GE interview question

2d array elements sorting program to detect memory leak