题解 | #字符串排序#

字符串排序

https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723

const rl = require("readline").createInterface({ input: process.stdin });

var iter = rl[Symbol.asyncIterator]();

const readline = async () => (await iter.next()).value;

void async function () {

    // Write your code here

    

    while(line = await readline()){

        const arr = [];

        const count = parseInt(line);

        for (let i = 0i < counti++) {

            arr.push(await readline())

        }

        arr.sort();

        arr.forEach((cell=> {

            console.log(cell);

        })

    }

}()const rl = require("readline").createInterface({ input: process.stdin });

var iter = rl[Symbol.asyncIterator]();

const readline = async () => (await iter.next()).value;

void async function () {

    // Write your code here

    

    while(line = await readline()){

        const arr = [];

        const count = parseInt(line);

        for (let i = 0i < counti++) {

            arr.push(await readline())

        }

        arr.sort();

        arr.forEach((cell=> {

            console.log(cell);

        })

    }

}()

全部评论

相关推荐

07-02 22:46
门头沟学院 Java
码农索隆:hr:“管你投没投,先挂了再说”
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务