Updated: 2024-03-12
1 min read
On This Page
class Solution:
def numberGame(self, nums: List[int]) -> List[int]:
nums.sort()
for i in range(0, len(nums), 2):
nums[i], nums[i + 1] = nums[i + 1], nums[i]
return nums