Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leetcode 2O24 Mar #192

Open
nuoxoxo opened this issue Mar 1, 2024 · 1 comment
Open

Leetcode 2O24 Mar #192

nuoxoxo opened this issue Mar 1, 2024 · 1 comment

Comments

@nuoxoxo
Copy link
Owner

nuoxoxo commented Mar 1, 2024

  • nuoxoxo/sea#1773
@nuoxoxo
Copy link
Owner Author

nuoxoxo commented Apr 2, 2024

Mar

Day
31 2444. Count Subarrays With Fixed Bounds 🔴
Sliding window
30 992. Subarrays with K Different Integers 🔴
Sliding window
3. Longest Substring Without Repeating Characters
Sliding window
🔒 159. Longest Substring with At Most Two Distinct Characters
Sliding window
🔒 340. Longest Substring with At Most K Distinct Characters
Sliding window
29 2962. Count Subarrays Where Max Element Appears at Least K Times 🟡
Sliding window
28 2958. Length of Longest Subarray With at Most K Frequency 🟡
Sliding window ⭐ 800 💎
🟥 395. Longest Substring with At Least K Repeating Characters
Sliding window
27 713. Subarray Product Less Than K 🟡
Two pointers
26 41. First Missing Positive 🔴
Cyclic sort
25 442. Find All Duplicates in an Array 🟡
Cyclic sort tabulation (naive)
24 287. Find the Duplicate Number 🟡
Two pointers
--- Series : Reverse Linked List ---
23 143. Reorder List 🟡
reverse linked list
22 234. Palindrome Linked List 🟢
reverse linked list
21 206. Reverse Linked List 🟡
reverse linked list
🟨 2130. Maximum Twin Sum of a Linked List
reverse linked list
20 1669. Merge In Between Linked Lists 🟡
linked list
--- END ---
19 621. Task Scheduler 🟡
greedy math
18 452. Minimum Number of Arrows to Burst Balloons 🟡
range Greedy end sort
points.sort()
_, runningE = points[0]
for i in range(1, len(points)):
    newS, newE = points[i]
    if newS <= runningE: # overlapped
        runningE = min(newE, runningE)
    else: # start a new active set
        runningE = newE
        res += 1
Day
🟨 2829. Determine the Minimum Sum of a k-avoiding Array
running & deciding
🟩 876. Middle of the Linked List
Fast & slow pointers
🟨 396. Rotate Function
Math
17 57. Insert Interval 🟡
range insight
16 525. Contiguous Array 🟡
Prefix sum
15 238. Product of Array Except Self 🟡
Prefix sum
i = 0;
while (++i < N) {
    L[i] = L[i - 1] * nums[i - 1];
    R[i] = R[i - 1] * nums[N - i];
}
i = -1;
while (++i < N)
    res[i] = L[i] * R[N - i - 1];
Day
--- Series : Sliding window - Binary search - 2 Pointers ---
14 930. Binary Subarrays With Sum 🟡
Sliding window
🟨 2750. Ways to Split Array Into Good Subarrays
Sliding window
🟥 2302. Count Subarrays With Score Less Than K
Sliding window
13 2485. Find the Pivot Integer 🟢
Binary search - can be solved using math
--- END ---
12 1171. Remove Zero Sum Consecutive Nodes from Linked List 🟡
HARD Problem 🔴 - Linked List dict
11 791. Custom Sort String 🟡
Dict Set lambda sort for Go
🟨 133. Clone Graph
BFS - DFS is possible
--- Series : Two Pointers --- Array & BTree problems
10 349. Intersection of Two Arrays 🟢
2 pointers Set
9 2540. Minimum Common Value 🟢
2 pointers Binary search Set
8 3005. Count Elements With Maximum Frequency 🟢
Dict
7 876. Middle of the Linked List 🟢
fast & slow pointers 2 pointers
6 141. Linked List Cycle 🟢
fast & slow pointers 2 pointers
5 1750. Minimum Length of String After Deleting Similar Ends 🟡
2 pointers
4 948. Bag of Tokens 🟡
2 pointers Greedy
3 19. Remove Nth Node From End of List 🟡
Fast & slow pointers
2 977. Squares of a Sorted Array 🟢
2 pointers - no extra sorting needed
--- END ---
1 2864. Maximum Odd Binary Number 🟢
string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant