思路:遍历一次字符串,当遍历到字符为数字时,计算数值(number = number*10 + (word.charAt(i)-‘0‘);),知道遍历到字符不为数字,将数值加入hash集合。遍历到字符不为数字时,继续遍历。
字符串中不同整数的数目
原文:https://www.cnblogs.com/youshou/p/14588960.html