We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 626038c + e61d2e6 commit 8f67e90Copy full SHA for 8f67e90
contains-duplicate/MrKeeplearning.java
@@ -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
@@ -0,0 +1,6 @@
+class MrKeeplearningValidPalindrome {
+ public boolean isPalindrome(String s) {
0 commit comments