题解 | #字符串排序#
字符串排序
http://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
let line1 = readline();
function func(n) {
const arr = [];
while (n--) {
arr.push(readline());
}
// 默认按字典排序
arr.sort();
arr.forEach((item) => {
print(item);
});
}
func(line1);