willkall

导航

2017年4月20日 #

【LEETCODE】:Sort Characters By Frequency

摘要: 声明:该题目来自https://github.com/soulmachine, 一、Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each elem 阅读全文

posted @ 2017-04-20 22:34 willkall 阅读(127) 评论(0) 推荐(0)

2017年4月15日 #

【LEETCODE】:Sort Characters By Frequency

摘要: 题目链接:https://leetcode.com/problems/sort-characters-by-frequency 题目简述:将给定的字符串按照出现频率由高到低排序后返回 思路:将输入的字符串按照字符与出现次数映射到一个map中,然后对map进行排序后输出 第一次代码如下: 编译错误,因 阅读全文

posted @ 2017-04-15 18:34 willkall 阅读(106) 评论(0) 推荐(0)