Skip to content

Commit cd6bb61

Browse files
committed
formatting and added 146 submitted and stats
1 parent 9ea29c6 commit cd6bb61

10 files changed

+11
-20
lines changed

0001-two-sum.py

-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
66
Runtime: 0 ms (beats 100.00%)
77
Memory: 17.98 MB (beats 14.36%)
8-
98
"""
109

11-
1210
class Solution:
1311
def twoSum(self, nums: List[int], target: int) -> List[int]:
1412
d = {}

0009-palindrome-number.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Submitted: October 30, 2024
55
66
Runtime: 4 ms (beats 35.53%)
77
Memory: 8.51 MB (beats 39.93%)
8-
98
*/
109

1110
class Solution {
@@ -23,4 +22,4 @@ class Solution {
2322
// should equal if they are palindrome
2423
return x == y;
2524
}
26-
};
25+
};

0014-longest-common-prefix.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This solution: November 25, 2024
66
77
Runtime: 0 ms (beats 100.00%)
88
Memory: 8.03 MB (beats 55.00%)
9-
109
*/
1110

1211
char* longestCommonPrefix(char** strs, int strsSize) {
@@ -29,4 +28,4 @@ char* longestCommonPrefix(char** strs, int strsSize) {
2928
prefix[i] = strs[0][i];
3029
}
3130
return prefix;
32-
}
31+
}

0014-longest-common-prefix.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This solution: November 24, 2024
66
77
Runtime: 0 ms (beats 100.00%)
88
Memory: 11.06 MB (beats 91.10%)
9-
109
*/
1110

1211
class Solution {
@@ -28,4 +27,4 @@ class Solution {
2827
}
2928
return prefix;
3029
}
31-
};
30+
};

0014-longest-common-prefix.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
Runtime: 37 ms (beats 5.20%)
88
Memory: 16.77 MB (beats 20.04%)
9-
109
"""
1110

1211
class Solution:
@@ -19,4 +18,4 @@ def longestCommonPrefix(self, strs: List[str]) -> str:
1918
prefix += items[0]
2019
else:
2120
return prefix
22-
return prefix
21+
return prefix

0020-valid-parentheses.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This solution: November 25, 2024
66
77
Runtime: 0 ms (beats 100.00%)
88
Memory: 7.90 MB (beats 74.91%)
9-
109
*/
1110

1211
class Solution {
@@ -28,4 +27,4 @@ class Solution {
2827
}
2928
return stack.empty();
3029
}
31-
};
30+
};

0066-plus-one-alternative.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
66
Runtime: 41 ms (beats 5.16%)
77
Memory: 16.52 MB (63.84%)
8-
98
"""
109

1110
class Solution:

0066-plus-one.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
Runtime: 41 ms (beats 5.16%)
88
Memory: 16.52 MB (63.84%)
9-
109
"""
1110

1211
class Solution:
@@ -16,4 +15,4 @@ def plusOne(self, digits: List[int]) -> List[int]:
1615
if digits[-1] == 9:
1716
return self.plusOne(digits[:-1]) + [0] # carry
1817
digits[-1] += 1 # if no carry, just add one
19-
return digits
18+
return digits

0146-lru-cache.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
22
146. LRU Cache
33
4+
Submitted: November 27, 2024
45
6+
Runtime: 81 ms (beats 66.53%)
7+
Memory: 182.14 MB (beats 24.43%)
58
*/
69

7-
// note: semi-realistic implementation
8-
910
class LinkedList {
1011
public:
1112
struct Node {
@@ -91,4 +92,4 @@ class LRUCache {
9192
* LRUCache* obj = new LRUCache(capacity);
9293
* int param_1 = obj->get(key);
9394
* obj->put(key,value);
94-
*/
95+
*/

0171-excel-sheet-column-number-alternative.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Submitted: October 4, 2024
55
66
Runtime: 0 ms (beats 100.00%)
77
Memory: 8.76 MB (beats 31.86%)
8-
98
*/
109

1110
class Solution {
@@ -19,4 +18,4 @@ class Solution {
1918
}
2019
return res;
2120
}
22-
};
21+
};

0 commit comments

Comments
 (0)