Pinterest Interview Question

Sort 2d array and return top k elements