为了账号安全,请及时绑定邮箱和手机立即绑定

求大佬帮忙,老师今天讲的太快,没懂,作业不会做

求大佬帮忙,老师今天讲的太快,没懂,作业不会做

崔佣幸 2019-07-30 21:13:37
已知数据手机号数组:String[] phones = {"13804010040","13804010041","13804010042","13804010043","13804010044","13804010045","13804010046","13804010047","13804010044","13804010054","13804010055","13804010056","13804010058","13804010059","13804010060","13804010061","13804010062","13804010063","13804010064","13804010065","13804010066","13804010067","13804010068","13804010069","13804010070","13804010071","13804010072","13804010073","13804010074","13804010075","13804010045","13804010057","13804010063","13804010058","13804010069","13804010066"}1使用集合,快速去除重复的手机号,将去重后手机号存放的List集合中,输出去重后有多少个手机号,13804010099这个手机号是否存在 2已知上面手机号数组,将数组转为集合,然后使用map集合存储每个手机号出现的次数,并遍历输出
查看完整描述

1 回答

?
安浪创想

TA贡献81条经验 获得超23个赞

做个遍历,在遍历的函数之外放一个全局变量。遍历到了就改遍历函数外的全局变量。这是学习算法的,还是要靠自己的逻辑去实现。

查看完整回答
1 反对 回复 2019-07-31
  • 1 回答
  • 0 关注
  • 687 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信