Skip to content

Commit 2dab379

Browse files
committed
refact: review
1 parent 4a29245 commit 2dab379

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

JavaScript/1044. Longest Duplicate Substring.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
*/
2222

2323
/** Binary Search + Rabin-Karp */
24-
// Time O(NlogN). O(logN) for the binary search and O(N) for Rabin-Karp algorithm.
25-
// Space O(N) to keep the hashset.
24+
// Time O(n log n). O(log n) for the binary search and O(N) for Rabin-Karp algorithm.
25+
// Space O(n) to keep the hashset.
2626
//
2727
// Split into two subtasks
2828
// Here we have "two in one" problem :

Python/0358. Rearrange String k Distance Apart.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"""
2525
Priority queue
2626
"""
27-
2827
import heapq
2928
from collections import Counter
3029

Python/0767. Reorganize String.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
#
4545
# Since you dont have any values in the heap you check if the res string is == S, why ? (if your input is like 'aaa' then the heap approach will give you 'aaa' which is same as S)
4646

47+
"""
48+
Priority queue
49+
"""
4750
import heapq
4851
from collections import Counter
4952

Python/1167. Minimum Cost to Connect Sticks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
Priority queue
2323
"""
2424
import heapq
25-
from collections import Counter
2625

2726

2827
class Solution:

0 commit comments

Comments
 (0)