55. Compare Strings
Compare two strings A and B, determine whether A contains all of the characters in B.
The characters in string A and B are all Upper Case letters.
一个Hashtable的题,用Hashtable统计A中各个字符出现的次数,当B中出现的时候就减去相应的次数,如果次数为负,说明B中出现了A中没有的字符
|
|
Compare two strings A and B, determine whether A contains all of the characters in B.
The characters in string A and B are all Upper Case letters.
一个Hashtable的题,用Hashtable统计A中各个字符出现的次数,当B中出现的时候就减去相应的次数,如果次数为负,说明B中出现了A中没有的字符
|
|