题解 | #字符串排序#
字符串排序
https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
import java.util.Scanner fun main(args: Array<String>) { val read = Scanner(System.`in`) val count = read.nextLine().toInt() val array = arrayOfNulls<String>(count) for (i in 0 until count) { array[i] = read.nextLine() } array.apply { sort() forEach { println(it) } } }