ทวีตที่ปักหมุด
𝕋𝕖𝕔𝕙 ℍ𝕦𝕟𝕥𝕖𝕣
693 posts


Day 32 of #GeekStreak60
“Largest BST” had me stuck for a bit 😅
Tried to find BSTs manually… didn’t work.
Switched approach → let each subtree decide if it’s a BST.
That changed everything.
#npci #coding #algorithms #GeekStreak60

English

Day 25.
Minimum K consecutive bit flips.
Instead of flipping bits every time, track flip state with a sliding window.
If current bit (after flips) is 0 → start a flip.
Greedy + difference array trick.Time: O(n)
#geekstreak60 #npci #DSA

English

Day 23.
Subarrays where the first element is the minimum.
Key idea:
Find the next smaller element using a monotonic stack.
If next smaller index is j,
valid subarrays starting at i = j - i.
Time: O(n)Stack patterns everywhere.
#geekstreak60 #npci #DSA

English

Day 22.
Largest number in one swap.
Track last position of digits 0–9.
From left → find a bigger digit later → swap once.
Greedy + indexing trick.O(n).
#geekstreak60 #npci #DSA

English

Open Source Automation Project
One student built an automation workflow used in an open-source project.
The workflow supports contributor coordination in GitPadi.
Real projects create stronger learning.
npmjs.com/package/gitpad…

English
𝕋𝕖𝕔𝕙 ℍ𝕦𝕟𝕥𝕖𝕣 รีทวีตแล้ว

Day 19.
Smallest window containing all characters.
Sliding window again.Count chars in p.
Expand right.
Shrink left when all chars are matched.
Track the smallest window.
Time: O(n)Patterns keep repeating in DSA.
#geekstreak60 #DSA #CodingJourney #npci

English

Stellar Pulse #episode 2 with manojimenzG x.com/i/spaces/1wxWj…
English

Day 18.
Longest substring with exactly K distinct characters.
Sliding window + frequency map.
Expand right.
Shrink left when uniques > k.
Track max when uniques == k.
O(n) time.Patterns make problems easier.
#geekstreak60 #DSA #Coding #npci

English

Day 17.
Max XOR subarray of size K.
Use sliding window + XOR cancellation trick.
a ^ a = 0 → remove old element, add new one.
O(n) instead of O(n*k).
Patterns everywhere.
#geekstreak60 #npci #DSA

English

Day 16.
Longest subarray with at most 2 distinct numbers.
Sliding window + hashmap.
Shrink when distinct > 2.
Same core pattern showing up again.
#geekstreak60 #npci #DSA

English

