My LeetCode grinding. Trying to do a problem a day.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

1234567891011121314151617181920212223242526272829
  1. In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times.
  2. Return the element repeated N times.
  3. Example 1:
  4. Input: [1,2,3,3]
  5. Output: 3
  6. Example 2:
  7. Input: [2,1,2,5,3,2]
  8. Output: 2
  9. Example 3:
  10. Input: [5,1,5,2,5,3,5,4]
  11. Output: 5
  12. Note:
  13. 4 <= A.length <= 10000
  14. 0 <= A[i] < 10000
  15. A.length is even