题解 | #数组去重#

字符串字符统计

http://www.nowcoder.com/practice/777d0cd160de485cae0b1fd1dd973b44

{"css":"","js":"function count(str) {\n    let obj = {};\n    for (let i = 0;i<str.length;i++){\n        if(obj[str[i]]){\n            obj[str[i]] += 1;\n        }else{\n            obj[str[i]] = 1;\n        }\n    }\n    return obj\n}","html":"","libs":[]}
全部评论

相关推荐

Aurora23:属于挂一半,暂时进池子了,隔一段时间没有其他组捞的话就彻底结束了
点赞 评论 收藏
分享
09-17 10:53
四川大学 C++
牛客91242815...:会写标书没有任何卵用,鉴定为横向垃圾导师的受害者
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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