剑指Offer:面试题03. 数组中重复的数字
题目描述:
题解:
class Solution {
public int findRepeatNumber(int[] nums) {
HashMap<Integer,Integer> maps = new HashMap<>();
int value = 0;
for(int i = 0; i < nums.length; i ++) {
// 调用 getOrDefault(); 方法,如果 num[i] 有值就返回原
原创
2020-06-16 18:20:27 ·
198 阅读 ·
0 评论