Free written solution

Minimum Number Game (LeetCode 2974): Solution and Explanation

Alice and Bob repeatedly remove the two smallest numbers, and Bob writes his number down before Alice writes hers. Return the list they write.

Read the intuition, approach, code and complexity →