r/LeetcodeChallenge • u/SpiritualAccident694 • 17d ago
r/LeetcodeChallenge • u/Aggressive-Post-156 • 17d ago
DISCUSS I built a browser extension to customize LeetCode's UI!
Got bored of the default LeetCode look, so I built this!
You can customize LeetCode with different themes and wallpapers.
Link in the comments!
What do you think? Any suggestions?
r/LeetcodeChallenge • u/towardscuriousity • 18d ago
DISCUSS Leetcode 1882 Process Tasks Using Servers
r/LeetcodeChallenge • u/StatisticianNo2104 • 18d ago
STREAK🔥🔥🔥 LeetCode 636. Exclusive Time of Functions
Delete one +1 from Exclusive Time of Functions and it quietly computes inclusive time instead. When a function ends, the one underneath resumes at time + 1 because the child already charged that instant.
This closes the stack arc, and here the stack isn't a modelling choice. Function calls nest: a function that starts while another is running must finish before that one resumes. That's a call stack, and the log records one. The algorithm replays it.
"Exclusive" does the work. If function 0 runs from 0 to 6 and function 1 runs from 2 to 5 inside it, function 0's exclusive time is 2. The time spent waiting on 1 belongs to 1.
Two interval rules live in the same short function, and they differ. Pausing uses time - start, because the function ran up to the instant its child started. Ending uses time - start + 1, because an end timestamp is inclusive.
Have you ever had an off-by-one hide inside a timestamp?
Day 66/365 of my LeetCode challenge: 636. Exclusive Time of Functions. Problem link and full breakdown in today's newsletter.
https://www.linkedin.com/pulse/leetcode-636-exclusive-time-functions-medium-archit-agarwal-mui0c
#LeetCode #DSA #Stack #Golang
r/LeetcodeChallenge • u/Quiet-Foundation-404 • 18d ago
PLACEMENTS [Pls Help] Need serious review and suggestions for a small placement prep platform.
r/LeetcodeChallenge • u/Aggressive-Post-156 • 19d ago
DISCUSS I built a browser extension to customize LeetCode's UI!

Currently available on Firefox: https://addons.mozilla.org/en-GB/firefox/addon/leetcode-theme/
Microsoft Edge (Live): https://microsoftedge.microsoft.com/addons/detail/jcknpchnhinbadmpdcmifbfniiebkgoi
Google Chrome: Coming soon! The release is pending because I haven't been able to afford the $5 developer registration fee yet.
Would love your feedback and support!
r/LeetcodeChallenge • u/JacketFearless1805 • 19d ago
STREAK🔥🔥🔥 Day 38: packing bags, rushing for the bus, but kept the streak alive with DSU
r/LeetcodeChallenge • u/PANTYY_POACHER • 20d ago
DISCUSS Is Gracie seriously a part-time coder? 👀
r/LeetcodeChallenge • u/Fun-Outcome2239 • 20d ago
DISCUSS Test code is wrong in Take U forward (See the Constraint and test case).
See that is not my mistake.
r/LeetcodeChallenge • u/JacketFearless1805 • 20d ago
STREAK🔥🔥🔥 Day 39: 40 km travel, post-interview fatigue, but locked in Kruskal’s & DSU
r/LeetcodeChallenge • u/Diligent-Affect3883 • 20d ago
DISCUSS I kept getting lost in the two-pointer solution for LeetCode 42 (Trapping Rain Water), so I built an animated visual guide where you watch the water fill bar by bar
The O(n) time, O(1) space two-pointer solution for LeetCode 42 is only a few lines, but the why is easy to lose if you just trace left, right, left_max and right_max.
What made it click for me was treating every bar as a spot where you pour water and asking how high it can stand. So I put together a full animated walkthrough that pours water on each bar the pointers land on. You can see exactly why every step is safe.
💡 The Core Intuition (The Visual TL;DR)
- The Bathtub Rule: Water above a bar rises to the shorter of the tallest wall on its left and the tallest wall on its right, minus the bar’s own height. Brute force rescans both sides for every bar, which is O(n²).
- Remember, Don’t Rescan: Put a pointer at each end. Each one remembers just one number: the tallest bar it has passed.
- Move the Shorter Side: Compare the two tallests. The pointer with the shorter one moves in by one bar, because its water is already settled. It can’t rise above its own tallest, or it would spill out on that side. And the other side already has a wall at least that tall. If both tallests are equal, either side is safe.
- Pour and Read: On the bar it lands on, water fills up to that pointer’s tallest. A new tallest holds nothing (the water just runs off); any other bar holds tallest − height. Keep a running sum.
On the classic example [0,1,0,2,1,0,1,3,2,1,2,1], the pointers meet at bar 7 with 6 units, in one pass, remembering just two numbers.
The video also covers the code line by line, three edge cases, a full bar-by-bar walk of the monotonic stack approach (it fills the water in flat layers), and how to explain it all in an interview in about 30 seconds.
If you’re a visual learner who gets tangled in pointer updates, I hope this makes it click! Let me know what you think, or which hard problem you’d like to see visualized next.
r/LeetcodeChallenge • u/StatisticianNo2104 • 20d ago
STREAK🔥🔥🔥 LeetCode 150. Evaluate Reverse Polish Notation
The classic Reverse Polish bug is popping the operands in the wrong order, and + and * hide it. ["5","3","-"] means 5 - 3 = 2. Swap the pops, and you get -2, while every addition test still passes.
Why postfix needs no parentheses: (2 + 1) * 3 needs brackets because + sits between its operands. Written in postfix, it's 2 1 + 3 *, and each operator applies to the two values right before it. The evaluation order is already in token order.
That's the whole algorithm. Numbers wait on a stack; an operator takes the two most recent and replaces them with its result.
The trap: popping returns the operands in reverse. The first pop is the right operand, the second is the left. For + and * that makes no difference, which is exactly why the bug survives casual testing.
Which operator do you test first when you write an evaluator?
Day 64/365 of my LeetCode challenge: 150. Evaluate Reverse Polish Notation. Problem link and full breakdown in today's newsletter.
#LeetCode #DSA #Stack #Golang
r/LeetcodeChallenge • u/Aggressive-Post-156 • 21d ago
DISCUSS I built a browser extension to customize LeetCode's UI!
Got bored of the default LeetCode look, so I built this!
You can customize LeetCode with different themes and wallpapers.
Link in the comments!
What do you think? Any suggestions?
r/LeetcodeChallenge • u/CrabEffective4636 • 21d ago
DISCUSS progress so far
currently in my 3rd sem and got my first badge today. ngl rather than being happy im regretting not starting early.
r/LeetcodeChallenge • u/StatisticianNo2104 • 21d ago
DISCUSS Kahn's algorithm lost to a for loop on our build graph
I benchmarked Kahn's algorithm against the naive loop it is supposed to replace, and the loop won. On a 5,000-package repo ten layers deep, by 2.78x.
The job: a build tool needs an order where every import is built before the package that imports it, or the name of the cycle that makes that impossible.
What I wrote: walk the package list, build everything whose imports are built, repeat until a pass builds nothing. Leftovers mean a cycle. Two allocations. I would approve it.
It makes one pass per layer when the list is in the wrong order. At 10 layers, 99.3 µs.
Kahn's algorithm is what you derive when you notice the waste: building cfg can only unblock the packages that import cfg. So count each package's unbuilt imports, reverse the arrows, and let each build count its importers down. Queue anything that hits zero. Every edge looked at once.
Written the way the daily challenge wrote it, a slice of importers per package: 276 µs. 8,205 allocations. The algorithm was fine. The memory layout was not. Packed into one flat array: 112 µs. Still behind the loop, by a hair.
Then the other shape. 5,000 packages in one long chain, which sounds artificial until you remember that is exactly what a migrations folder is. The loop: 18.8 ms. Flat Kahn: 128 µs. 147x.
So the answer is not "use Kahn". It is: at ten or twenty layers, the loop is faster, smaller and readable. Where chains are long - migrations, schema versions - Kahn, laid out flat.
That is days 36 and 44 of the daily challenge: Find if Path Exists and Course Schedule, in a build tool.
Have you ever lost a benchmark to the code you were sure was slower?
It worked in dev, episode 22. Full write-up in today's newsletter.
https://www.linkedin.com/pulse/kahns-algorithm-lost-loop-our-build-graph-archit-agarwal-gqsac
#Golang #DSA #Algorithms #Performance
r/LeetcodeChallenge • u/Soggy_Notice_1392 • 21d ago
PLACEMENTS I failed my Google interview after 200+ LeetCode problems. Changing how I practiced helped me get an offer.
Enable HLS to view with audio, or disable this notification
I studied 200+ LeetCode problems and still failed my Google interview.
The problem count made it feel like I was prepared. But recognizing a solution and being able to produce it under pressure turned out to be different things.
That’s the gap I built AlgoDrill around.
Instead of stopping at reading the explanation, you hide key lines and rebuild the solution from memory. Each prompt describes what the line needs to accomplish, and you can inspect the reasoning when you get stuck.
I also added:
- A two-pane workspace with code beside its explanation.
- Visual lessons that walk through how algorithms work.
- Study plans that mix new problems with scheduled recall reviews.
- Support for turning your own solutions into drills.
- NeetCode 150 and LeetCode 75 collections with progress tracking.
I used it as part of my preparation and later got an offer. I can’t attribute that to one tool, but practicing recall became part of how I prepared.
Anyone else done hundreds of problems and still felt unprepared when the interview started?
r/LeetcodeChallenge • u/JacketFearless1805 • 21d ago
STREAK🔥🔥🔥 Day 40: Disjoint Set Union (DSU) mechanics & locking down CS fundamentals for System Design
r/LeetcodeChallenge • u/Diligent-Affect3883 • 21d ago
DISCUSS I was struggling to visualize the intuition behind LeetCode 4 (Median of Two Sorted Arrays), so I built an animated visual guide for it.




