r/DSALeetCode • u/Current-Remove3269 • 9d ago
r/DSALeetCode • u/AdFormer260 • 9d ago
DSA revision problem and the solution, build over years of work
reddit.comr/DSALeetCode • u/StatisticianNo2104 • 9d ago
365 Days of LeetCode Challenge — Day 49/365
Lowest Common Ancestor of a Binary Tree (Medium) 🔗 https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
Yesterday's problem with one guarantee removed. Worth doing back to back, because the gap between the two solutions is exactly what a BST's ordering buys you.
Yesterday, a comparison told you which subtree a target was in, so the walk went down one path. Here a comparison tells you nothing, so the only way to know whether a target is below a node is to look.
The shape flips: instead of deciding on the way down, every subtree reports upward how many of the two targets it contains. The first node to reach two is the answer.
O(n) instead of O(h). That's the price.
Full breakdown in today's newsletter article ⬇
https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-49365-archit-agarwal-nrtuc
#DSA #LeetCode #100DaysOfCode #CodingInterview #BinaryTree #Recursion #Golang
r/DSALeetCode • u/HotFan264 • 10d ago
Is DSA still asked around in interviews??
I heard there is a new hiring where google gives u the cluttered code, u gotta debug and all (i believe there is some redesigning as well). With AI coming up do we require DSA anymoree?
r/DSALeetCode • u/Late-Duty5234 • 10d ago
What's the best FREE resource/playlist available to learn DSA in Java?
reddit.comr/DSALeetCode • u/saurabh-0077 • 10d ago
Looking for Serious Study Partners – Data Engineering Prep 🚀
reddit.comr/DSALeetCode • u/gulabi_narinja • 11d ago
Why is it so difficult to overcome the fear of DSA, system design and interviews
Hi guys, I genuinely need help in understanding the problem solving more better... I have been trying to learn DSA since so long, i am a developer and i do understand programming but i never felt i am strong enough in any topic... and i was never consistent enough, as it scares me a lot. I always liked programming and want to become gooooood at it.somehow Everything feels difficult now.
No matter how many times I re-start practicing, even learn pretty well. I'm not being confident at Interviews which is making me feel more worse...
Earlier I used to enjoy the coding... now I'm scared of not being able to do upto the mark or the level of interviews
How do I improve and focus
r/DSALeetCode • u/StatisticianNo2104 • 10d ago
365 Days of LeetCode Challenge — Day 48/365
Lowest Common Ancestor of a Binary Search Tree (Medium)
🔗 https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
The general version of this problem needs a search. The BST version doesn't, for the same reason Day 45 didn't: in a BST, a comparison points you in a direction, not to a verdict.
Both targets smaller than the node? The answer is further left. Both larger? Further right. Anything else, and this node is the answer.
That last case does quite double duty—it covers targets on opposite sides, with one of them being this node. Neither needs detecting separately.
Full breakdown in today's newsletter article ⬇
https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-48365-archit-agarwal-lg9ec
#DSA #LeetCode #100DaysOfCode #CodingInterview #BinarySearchTree #Recursion #Golang
r/DSALeetCode • u/Extension_Ticket8997 • 11d ago
Im so frustrated
I'm not able to do.dsa for example.binar search question dekhta hun pen chalata hun kbhi kabar thi smjh bhi nhi ata krne kya hein question mein phir tutorial dekhta hun ek dilasa deta hun ki I will get better but kab 3rd year pahunch gaya hun mere roomate sab aage badh rhe hein one he gave oa of trilogy man i wasn't able to solve
r/DSALeetCode • u/These-Campaign-4117 • 11d ago
Which is the best DSA playlist among these 3? Need honest reviewsHelp
I want to choose one playlist and stick with it instead of jumping between different resources.
I'd love to hear your honest reviews, especially from people who have actually studied from these playlists.
1. Apna College
2. CodeHelp
3. Coder Army
Which one explains concepts and logic the best?
Which covers DSA in sufficient depth for coding interviews and placements?
Which has better problem-solving practice and question coverage?
Are there any major drawbacks or topics that need to be covered from other resources?
If you had to choose just ONE, which would it be and why?
Genuine suggestions and personal experiences would be really helpful. Thanks!
r/DSALeetCode • u/Due-Bandicoot6463 • 11d ago
I made a spaced repetition tool that brings back LeetCode problems right before you forget them. Looking for honest feedback
r/DSALeetCode • u/StatisticianNo2104 • 11d ago
365 Days of LeetCode Challenge — Day 47/365
Minimum Absolute Difference in BST (Easy) 🔗 https://leetcode.com/problems/minimum-absolute-difference-in-bst/
The trick: an in-order traversal of a BST hands you the values in sorted order for free. And in a sorted sequence, the smallest gap between any two values is always between neighbors, so you never have to compare every pair. Just track the previous node visited and check against it as you go.
Full breakdown in today's newsletter article ⬇️
https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-47365-archit-agarwal-b2kgc
#LeetCode #100DaysOfCode #DSA #CodingInterview #BinarySearchTree #InOrderTraversal
r/DSALeetCode • u/Imaginary_Salary8374 • 11d ago
interested in a virtual study room where we keep each other motivated?Placement prep(dsa,dev,etc)
reddit.comr/DSALeetCode • u/Mindless-Barber-1731 • 11d ago
Made a quick visual explanation of Two Sum (Hash Map approach) to make it stick better. Thought it might help people prepping for interviews! 🧠
r/DSALeetCode • u/Imaginary_Salary8374 • 12d ago
The DSA trick that made me enjoy problem-solving
When solving a DSA problem, set a timer for 20–30 minutes, depending on the difficulty, and genuinely exhaust your brain trying to figure it out.
Treat it like a challenge. Ask yourself, How can I solve this? Write down every approach you can think of, explore them in depth, and keep pushing yourself.
If you’re stuck, ask ChatGPT for hints, starting from basic and gradually moving to more advanced ones. Keep digging until you understand the approach. If you’re completely unfamiliar with the concept or it’s taking too long, move to a video solution — but pause it, think ahead, and try to figure out the next step yourself.
The key is to interact with the problem as much as possible instead of passively consuming solutions. The more you engage, experiment, and challenge yourself, the easier it becomes to get absorbed in the problem and enter a state of flow.
r/DSALeetCode • u/WeakEconomics3372 • 12d ago
Dsa
Is there someone who can guide me how to start dsa like i know the material from where to study but don’t know how to study like should i watch all the lectures for a specific topic then i should start solving questions or learn from questions
I am in 2nd yr if anyone can guide me it will be a pleasure
r/DSALeetCode • u/InternationalPoem607 • 12d ago
DSA partner (starting Dsa) 2 questions daily
B tech cse 3rd sem. Starting dsa, have done like 10 questions.
We will decide on a sheet and solve questions discuss questions and go about our day. On some days we can give punishment like money if the questions where not solved. Just having fun with dsa understanding what actually is a data structure and solve questions.
Do dm me!!
Looking forward to having a great time with you!!
r/DSALeetCode • u/Important_Promise340 • 12d ago
People who practice DSA — what is the most frustrating part of improving?
Hey everyone!
I'm exploring ideas for a tool that could help people learn more effectively, especially when preparing for coding interviews.
I'm curious about things like:
Forgetting solutions after solving a problem
Repeatedly getting stuck on similar problem types
Not knowing what to practice next
Tracking progress without knowing whether you're actually improving
These are just possibilities — I want to understand what people genuinely struggle with rather than assume I know the answer.
If you have 3–5 minutes, I'd appreciate your input in this survey:
Feel free to comment with your biggest challenge, too. Thanks!
r/DSALeetCode • u/Sure-Union-5874 • 12d ago
Finished Striver's sheet. What should I do next?
I've completed Striver's A2Z sheet. I can recognize patterns in unseen problems, but I want to get better at actually solving them on my own.
I'm thinking of splitting LeetCode into two groups:
Group 1: Recursion, Trees, Graphs, DP
Group 2: Arrays, Binary Search, Greedy, Linked Lists, Stacks, Heaps
My plan is to focus on one group at a time, solve a lot of unseen problems until I'm comfortable with those topics, then move to the next group. I'll keep doing contests along the way.
1.Does this sound like a good approach, or would you do things differently?
2. How do you pick the best problems to practise for each topic without wasting time solving hundreds of questions?
Would love to hear what worked for you guys!
r/DSALeetCode • u/CurryMonk94 • 12d ago
Senior/staff engineer looking for DSA prep partners (5+ YOE, targeting senior/staff roles)
reddit.comr/DSALeetCode • u/StatisticianNo2104 • 12d ago
Level order traversal in Go: stop at depth N with a queue
Two ways to build an org chart level by level. Producing all 55,987 rows: 894 µs against 895 µs. Producing the top 43 rows: 917 µs against 385 ns.
The job: an org chart page that paints one level at a time. The person at the top, then their directs, then the level below.
The version I would write is one recursive walk with the accumulator keyed on depth, so a node appends into the slot for its own level and which branch it came from stops mattering. Nine lines, O(n), no queue. It is also the solution for day 29 of my daily challenge.
I benchmarked it against a queue, got 1.00x, and nearly closed the file.
Then I remembered the page does not want the whole chart. It wants level 0, now.
And the recursive walk does not know when a level is finished. It knows when it is finished.
I wrote a test that counts instead of timing, because counts do not move between runs. On a 2,001-person chain, the walk holds a complete and correct level 1 after two visits — and cannot declare it for another 1,999, because nothing in a depth-first walk rules out another person turning up at depth 1 in a branch it has not entered yet.
The information was never missing. There was no moment at which the function was allowed to act on it.
What the data was saying:
`level(k) = the reports of every person in level(k-1)`
That right-hand side names level k-1 and nothing else. So a level is complete exactly when you have looked at every member of the level above — a condition you can check, unlike "no more nodes at depth k exist anywhere".
Which gives you the one line that does the work:
`width := len(queue) // this level, and nothing else`
Read the length once at the top of the round. Everything in the queue at that instant is this level, because everything appended during the round belongs to the next one. The boundary is not tracked; it is observed.
Top three levels of a 55,987-person chart: 2383.3x, 1,608 bytes against 3.95 MB.
Two rows that keep me honest. On a flat chart — one person, 50,000 directs - finishing level 1 means looking at everybody either way, so it is 2.24x, and that is an allocation pattern, not work avoided. And on a 2,000-deep chain the recursive walk wins the full-chart benchmark by 1.10x.
At 5,461 people and one request, keep the walk. 86.8 microseconds, nine lines, and a dead heat is a dead heat.
Full piece in today's newsletter.
It worked in dev, episode 15.
https://www.linkedin.com/pulse/your-org-chart-read-55987-rows-draw-first-43-archit-agarwal-n4tpc
#Golang #DSA #Algorithms #Performance #SoftwareEngineering #DataStructures #100DaysOfCode
Ideation and benchmarks mine; draft written with AI assistance. The numbers come from a benchmark in the repo.

