Added a heap to store the result, less sorting...