N-Repeated Element in Size 2N Array LeetCode solution in Java

1
class Solution {
2
public int repeatedNTimes(int[] nums) {
3
int count = 0;
4
for (int i = 0; i < nums.length; i++) {
5
for (int j = i + 1; j < nums.length; j++) {
6
if (nums[i] == nums[j]) count = nums[j];
7
}
8
}
9
return count;
10
}
11
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0