[LeetCode] Minimum Number Game

1 · · Dec. 24, 2023, 4:04 a.m.
10035. Minimum Number Game You are given a 0-indexed integer array nums of even length and there is also an empty array arr. Alice and Bob decided to play a game where in every round Alice and Bob will do one move. The rules of the game are as follows: Every round, first Alice will remove the minimum element from nums, and then Bob does the same. Now, first Bob will append the removed element in the array arr, and then Alice does the same. The game continues until nums becomes empty. Return t...