We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a069025 commit cd94609Copy full SHA for cd94609
contains-duplicate/f-exuan21.java
@@ -3,7 +3,7 @@
3
4
class Solution {
5
public boolean containsDuplicate(int[] nums) {
6
- HashSet<Integer> set = new HashSet<>();
+ Set<Integer> set = new HashSet<>();
7
for(int i : nums) {
8
if(set.contains(i)) {
9
return true;
0 commit comments