根本就不用sort,整数数据直接计数排序O(n)。这种题有啥意思呢,我不翻笔记也不能立马写出来,但我写出来肯定比别人写的好
let n = readline() let set = [] while(n--) { set[readline()] = 1 } set.forEach((v, i) => console.log(i))
let n = readline() let set = [] while(n--) { set[readline()] = 1 } set.forEach((v, i) => console.log(i))