LeetCode 2231. Largest Number After Digit Swaps by Parity
This problem can be translated into...
This problem can be translated into...
Do as the game. Choose two heaviest stone and do the subtraction.
Use priority queue to find the largest k numbers. also and their index.
Maintain a Heap that contains only the K biggest the element.
First we need to sort the scores from biggest to smallest.