
nums를 내림차 순 정렬Alice가 선택Bob이 선택Bob의 수를 arr에 추가Alice의 수를 arr에 추가arr 반환function numberGame(nums: number[]): number[] {
const sorted = nums.toSorted((a, b) => b - a)
const arr = []
while(sorted.length) {
const alice = sorted.pop()
const bob = sorted.pop()
arr.push(bob)
arr.push(alice)
}
return arr
};