题解 | #提取不重复的整数#

提取不重复的整数

https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1

const rl = require("readline").createInterface({input:process.stdin});
var iter = rl[Symbol.asyncIterator]();
const readline =async () => (await iter.next()).value;

void async function(){
    const str = await readline();
    const set = new Set();
    const len = str.length;
    let res = "";
    for(let i = len-1; i >= 0; i--){
        const c = str.charAt(i);
        if(!set.has(c)) res += c;
        set.add(c);
    }
    console.log(res);    
}()

全部评论

相关推荐

09-19 14:12
武汉大学 golang
并没有发笔试,只是顺延了两次,去看官网发现流程结束了
无敌忍耐王:三个工作日没人捞就自动结束了
投递美团等公司10个岗位
点赞 评论 收藏
分享
Clavoss:一眼AI,死亏
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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