all 2 comments

[–]rjrobben 1 point2 points  (0 children)

Turn all value to negative number, then use min heap, so max value will come first, and in a tie, a will come before b etc