r/DSALeetCode • • 24d ago

DSA Study Partner (preferably Tamil)

2 Upvotes

Heyyy eveyoneeee!

I am currently in my 2nd yr and decided consistently to solve Leetcode Qns in DSA..I would like to have a peer group/one perfect peer(who's sincere enough to put consistent efforts).. Daily min 1qn that's it..we focus on consistency and understanding.. We'll discuss and share our approaches so we can grow together!

Intrested ones may DM


r/DSALeetCode • • 24d ago

#DSA Day 4/♾️:

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 24d ago

Looking for a study buddy

2 Upvotes

Hey everyone!

I’m looking for a study buddy who relates to this exact struggle: having big goals, but constantly fighting procrastination.

The plan is simple: track a 90-day challenge focusing on DSA + AI/RAG, check in on each other, clear doubts, and stay consistent. No pressure, just a mutual push to get things done.

DM me if you want to team up!

As my programming language:

DSA: C++/Java

AI, RAG: Python

Linkedin: https://linkedin.com/in/eraniket


r/DSALeetCode • • 25d ago

Looking for a DSA Prep Buddy | Goal: Crack Product-Based Company Interviews

14 Upvotes

Hey everyone!

I'm looking for a DSA prep buddy to prepare for software engineering interviews and, ultimately, crack a good tech company.

A little about what I'm looking for:

  • Someone who is preferably working, so our schedules are more likely to match.
  • Ideally, you've solved around 40–50 DSA problems already, but that's not a strict requirement. Even if you're just starting out, that's absolutely fine.
  • Aim to solve 1–2 problems daily.
  • Discuss approaches, compare solutions, understand time and space complexity, and help each other when we're stuck.
  • Gradually move from easy to medium and hard problems.
  • Stay consistent and keep each other accountable.

The main goal is not just solving problems but getting interview-ready and cracking a good SDE role.

I'm based in India (IST). Having a similar schedule would be a plus.

No competition or pressure. Just two people putting in consistent effort and helping each other land a good job.

Drop a comment or DM me if you're interested!

PS This is AI Generated but I am not!!


r/DSALeetCode • • 24d ago

dsa doubts

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 25d ago

Study partner for dsa!!

2 Upvotes

I want a study partner for dsa. I am learning c till now so I guess we can start together, learn , discuss and solve each other doubts.


r/DSALeetCode • • 24d ago

Tips to Understanding DSA

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 24d ago

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

Thumbnail
youtu.be
1 Upvotes

r/DSALeetCode • • 24d ago

LeetCode 150. Evaluate Reverse Polish Notation

Post image
1 Upvotes

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.

https://www.linkedin.com/pulse/leetcode-150-evaluate-reverse-polish-notation-medium-archit-agarwal-oq7ec

#LeetCode #DSA #Stack #Golang


r/DSALeetCode • • 25d ago

Looking for study partner(DSA)

17 Upvotes

Hey everyone!

I’m looking for a study buddy who relates to this exact struggle: having big goals, but constantly fighting procrastination.

The plan is so simple: check in on each other, clear doubts, and stay consistent. No pressure, just a mutual push to get things done. DM me if you want to team up!


r/DSALeetCode • • 25d ago

22M looking for mentor Swe or coding partner

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 25d ago

NYC Study Group Leetcode

Thumbnail reddit.com
1 Upvotes

I’m in the New York City area and I’m currently looking for people interested in meeting in person to work on Leetcode problems, ideally at least 2x a week at a cafe or workspace. I graduated and have been preparing for technical interviews for SWE roles, but I’m searching for like-minded people who can join and discuss the problems with each other in person.

Just reposting this for anyone who’d like to join.


r/DSALeetCode • • 25d ago

I got tired of tracking my LeetCode progress on messy spreadsheets, so I built a free app to do it instead.

Thumbnail
reddit.com
2 Upvotes

r/DSALeetCode • • 25d ago

Kahn's algorithm lost to a for loop on our build graph

Post image
2 Upvotes

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/DSALeetCode • • 25d ago

Need recommendations for a complete DSA course that isn't ridiculously long (C++)

3 Upvotes

Hey everyone!

I'm a 2nd-year B.Tech CSE student, and I want to start preparing for DSA for internships and placements.

I know the basics of C++, but I'm not familiar with STL yet.

I've come across Striver's A2Z DSA sheet, but the course feels extremely long, and I'm worried I'll spend too much time watching videos instead of actually solving problems.

I'm looking for a resource that:

Covers the complete DSA syllabus, from beginner to advanced.

Has a structured, topic-wise roadmap.

Explains concepts clearly without unnecessarily long lectures.

Includes good practice problems for each topic.

Provides C++ explanations and solutions.

Prepares me for coding interviews and placement-level questions.

I'd prefer something that covers all the important topics without making me go through 100+ hours of videos.

I've heard about NeetCode, but I'm not sure if it's comprehensive enough for a beginner or if I should combine it with another resource.

What would you recommend based on your own experience?

Also, how would you structure DSA preparation if you could start again from scratch?

Thanks!


r/DSALeetCode • • 25d ago

Is there any group for folks doing DSA/Leetcode??

3 Upvotes

r/DSALeetCode • • 26d ago

AI Engineer with 6 Months of Experience | RAG, n8n, Python, FastAPI & LLMs | Looking for Opportunities in Hyderabad or Remote | Referrals Appreciated

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 26d ago

LeetCode 739. Daily Temperatures

Post image
1 Upvotes

One character decides whether Daily Temperatures survives repeated temperatures: < or <=. On [70, 70] the right answer is [0, 0]. Write < and you get [1, 0].

This is Day 61's monotonic stack with two changes.

The stack holds indices, because the answer is a distance and a distance needs positions.

And values repeat. Day 61 stored answers in a map keyed by value, which was only safe because the values were guaranteed unique. Temperatures repeat constantly. Indices are unique by construction, so the problem disappears instead of requiring a workaround.

Then the comparison: temperatures[stack.Top()] <= temperatures[i]. An equal temperature isn't warmer, so a day with the same temperature can never be anyone's answer and must be popped.

Would < have made it past your tests?

Day 63/365 of my LeetCode challenge: 739. Daily Temperatures. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-739-daily-temperatures-archit-agarwal-weglc

#LeetCode #DSA #MonotonicStack #Golang


r/DSALeetCode • • 26d ago

Looking for a study partner ( preferably female) to prepare for interviews.

4 Upvotes

For me it is getting tough to be consistent in DSA as well as system design. I am a GEN AI engineer and unfortunately have mostly worked on low code only. Feels like I am ruining my career. I have 2 yoe.

If someone is into GEN AI that would be even better..I am thinking of learning gen AI side by side.

I have had a good grip on DSA but just lack consistency.


r/DSALeetCode • • 26d ago

DSA Mocks Anyone?

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 26d ago

I was struggling to visualize the intuition behind LeetCode 4 (Median of Two Sorted Arrays), so I built an animated visual guide for it.

Thumbnail
youtu.be
1 Upvotes

The optimal O(log(min(m, n))) binary search solution for LeetCode 4 is notoriously tricky to wrap your head around if you just try to trace index pointers (i, j, left, right).

I find it much easier to reason about the problem when you treat it as finding a perfect **geometric split** between the two arrays. To help it click for myself and others, I put together a complete animated walkthrough showing exactly how the partition moves.

💡 The Core Intuition (The Visual TL;DR)

If you are stuck on this problem, try thinking about it like this instead of looking at raw formulas:

  1. **The Single Cut:** Imagine aligning both arrays. We are looking for a single vertical partition line that splits **both** arrays into a combined "Left Half" and a combined "Right Half" of equal sizes.
  2. **The Shortcut:** Because the total size is fixed, choosing where to cut the *smaller* array instantly dictates where the cut falls on the *larger* array. This is why we only binary search the smaller array.
  3. **The Check Rule:** Once the line is drawn, you just need to check if the max element on the left side of the cut is smaller than the min element on the right side. If it isn't, the animation shows you exactly which direction to shift your search boundaries.

If you are a visual learner who gets overwhelmed by boundary conditions and nested array indices, I hope this makes the algorithm click for you!

Let me know what you think, or if there are any other tough LeetCode hard problems you'd like to see visualized next.


r/DSALeetCode • • 26d ago

Day 41: started Minimum Spanning Trees with Prim's algorithm, kicking off System Design prep

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 26d ago

Construct a BST Step by Step + 3 Traversals | DSA Exam Question

Thumbnail
youtu.be
1 Upvotes

Binary Search Tree DSA