Skip to content

Commit 8f67e90

Browse files
authored
Merge pull request #665 from MrKeeplearning/main
[MrKeeplearning] Week1
2 parents 626038c + e61d2e6 commit 8f67e90

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.util.*;
2+
3+
class MrKeeplearningContainsDuplicate {
4+
public boolean containsDuplicate(int[] nums) {
5+
HashSet<Integer> hashSet = new HashSet<>();
6+
for (int num : nums) {
7+
if (!hashSet.add(num)) {
8+
return true;
9+
}
10+
}
11+
return false;
12+
}
13+
}

valid-palindrome/MrKeeplearning.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class MrKeeplearningValidPalindrome {
2+
public boolean isPalindrome(String s) {
3+
4+
return false;
5+
}
6+
}

0 commit comments

Comments
 (0)