Skip to content

Commit

Permalink
Merge pull request #665 from MrKeeplearning/main
Browse files Browse the repository at this point in the history
[MrKeeplearning] Week1
  • Loading branch information
SamTheKorean authored Dec 22, 2024
2 parents 626038c + e61d2e6 commit 8f67e90
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contains-duplicate/MrKeeplearning.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import java.util.*;

class MrKeeplearningContainsDuplicate {
public boolean containsDuplicate(int[] nums) {
HashSet<Integer> hashSet = new HashSet<>();
for (int num : nums) {
if (!hashSet.add(num)) {
return true;
}
}
return false;
}
}
6 changes: 6 additions & 0 deletions valid-palindrome/MrKeeplearning.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class MrKeeplearningValidPalindrome {
public boolean isPalindrome(String s) {

return false;
}
}

0 comments on commit 8f67e90

Please sign in to comment.