
people 정렬function reconstructQueue(people: number[][]): number[][] {
const sorted = people.toSorted(([aH, aK], [bH, bK]) => {
if(aH !== bH) return bH - aH
return aK - bK
})
const result = []
for(const curr of sorted) {
result.splice(curr[1], 0, curr)
}
return result
};