阅读背景:

在java中查找字符串中字符频率的有效方法:O(n)

来源:互联网 

In a recent interview I was asked to write the below program. Find out the character whose frequency is minimum in the given String ? So I tried by iterating through the string by using charAt and storing the character as key in a HashMap and the number of occurences as its value. Now Again I have to iterate on the Map to find the lowest element.In a recent interview I was asked to write the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: