leetcode 287: Find the Duplicate Number(二分和List)

题意:找出数组中的重复元素。数组 思路1:将数组中的元素放入List里面,当有元素已经存在时就直接返回这个值。排序 代码:io class Solution {     public int findDuplicate(int[] nums) {         List <Integer> res =new ArrayList<Integer>();         int result=0;
相关文章
相关标签/搜索