Heap based K closest problem.