Skip to content

Largest Number After Digit Swaps by Parity

An Easy coding interview problem in the Heap / Priority Queue pattern.

Likely pattern

Heap / Priority Queue

Always pull the current best element in log time.

Recognition cue: Top K, K closest, running median, or repeatedly taking the smallest / largest.

Learn first
Do not confuse it with

Topics

  • Sorting
  • Heap (Priority Queue)
  1. 1Easy
  2. 2Easy
  3. 3Easy
  4. 4Easy
  5. 5Easy
  6. 6Easy
  7. 7Easy
  8. 8Medium