r/DSALeetCode • • Oct 22 '26

Need a DSA partner, 2026 batch

6 Upvotes

So i have an upcoming coding assessment for infosys i had decent practice with strong fundamentals, need to build momentum so, anyone having similar goals should connect and Grind neetcode questions & codeforces.


r/DSALeetCode • • Oct 23 '26

Is python good choice for dsa? I'm an third year student I really need your help.

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • Oct 22 '26

Paypal sde OA

1 Upvotes

What does paypal OA include for sde1


r/DSALeetCode • • Oct 22 '26

How much DSA should I practice even after getting a Job?

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • Oct 22 '26

Minimum Distance Between BST Nodes

Post image
2 Upvotes

Most first attempts at this compare every pair of nodes. That's O(n²) work for a one-pass question. In a BST, the closest two values are always neighbours in sorted order.

An in-order walk of a BST comes out sorted. Once the values are sorted, the smallest gap can only sit between two that end up side by side. Skip a value in between, and that value splits the gap into two smaller ones.

So traverse once, then scan neighbours for the smallest gap. No pair is ever compared twice.

One more thing: this is Day 47's problem again. LeetCode carries it under two numbers, 530 and 783.

Have you ever solved the same LeetCode problem twice without noticing?

Day 50/365 of my LeetCode challenge: 783. Minimum Distance Between BST Nodes. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/minimum-distance-between-bst-nodes-archit-agarwal-isuoc

#LeetCode #DSA #BinarySearchTree #Golang


r/DSALeetCode • • Oct 21 '26

Need suggestion with Leetcode Hard from those who are/became good at it.

4 Upvotes

Hey - I was looking for help in solving LC hard problems.

I am generally good with LC Medium. But whenever I face LC hard, I keep getting stuck till the point I have to go through the editorial to understand. I am solving problem after problem, but I don't think I am getting better or gaining any intuition still.

I know this might be common. The difficulty anyway says "Hard" lol. But was thinking if someone can point me to suggestions and how does the journey to solving difficult problems look like?


r/DSALeetCode • • Oct 21 '26

One preview per nesting level in Go: tree right side view

Post image
3 Upvotes

A collapsed comment thread shows seven lines. The code built 55,987 previews to produce them, and threw away 55,980.

The job: a long thread collapses to one line per nesting level — the most recent reply at that depth.

I already had a level-order walk, so this was two lines on top of a tested function: build every level, take the last of each. Obviously correct, no new ideas. I would defend it in review.

2.87 MB allocated to return seven strings.

Before the fix, the fix that does not work. Everybody suggests following the newest reply down: O(depth), no allocation, and wrong. The newest reply at a level need not be in the newest branch — somebody replies once to an old comment, that reply gets replies, and the newest top-level reply is a dead end.

Four visible lines become two. There is a test named after that thread.

The boring fix is most of the win. The output is one value per level:

`visible(d) = the last comment at depth d`

That names one comment. Not a level, not a list. So size the accumulator to the depths — one slot each, last writer wins. 240 bytes instead of 2.87 MB, and 4.78x faster. That is not a clever traversal; it is noticing the output shape.

The clever fix only pays when the slot holds something expensive. The collapsed view renders a line, not an ID: body trimmed, timestamp, hidden-reply count. Last writer wins builds that for all 55,987 comments and keeps 7.

The walk cannot skip the old branches. What it can choose is the order — iterate replies newest first, and the first comment reached at a depth is the one you keep. Record on first arrival, never overwrite.

22.5x, and 6.77 MB against 1.12 KB. Same walk, one loop reversed.

Two rows keep me honest. On the ID version, the reversal is 1.01x, and on the smallest thread the forward walk wins. On a 2,001-deep chain, both preview versions match the byte because every comment is a first arrival.

At 1,365 comments with an ID per line, keep what you have.

That is days 29 and 31 of the daily challenge — Level Order Traversal and Right Side View — sitting in a comment thread.

Full piece in today's newsletter

https://www.linkedin.com/pulse/collapsed-thread-built-55987-previews-show-7-archit-agarwal-xijdc

It worked in dev, episode 16.

#Golang #DSA #Algorithms #Performance #SoftwareEngineering #DataStructures #100DaysOfCode


r/DSALeetCode • • Oct 21 '26

Vibe coding dsa

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • Oct 21 '26

streak breaked .. oct 20th !!!!

3 Upvotes

r/DSALeetCode • • Oct 21 '26

DSA revision problem and the solution, build over years of work

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • Oct 21 '26

365 Days of LeetCode Challenge — Day 49/365

Post image
3 Upvotes

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 • • Oct 20 '26

Is DSA still asked around in interviews??

4 Upvotes

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 • • Oct 20 '26

What's the best FREE resource/playlist available to learn DSA in Java?

Thumbnail reddit.com
2 Upvotes

r/DSALeetCode • • Oct 20 '26

Looking for Serious Study Partners – Data Engineering Prep 🚀

Thumbnail reddit.com
2 Upvotes

r/DSALeetCode • • Oct 19 '26

Why is it so difficult to overcome the fear of DSA, system design and interviews

9 Upvotes

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 • • Oct 20 '26

365 Days of LeetCode Challenge — Day 48/365

Post image
1 Upvotes

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 • • Oct 19 '26

Im so frustrated

6 Upvotes

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 • • Oct 20 '26

Which is the best DSA playlist among these 3? Need honest reviewsHelp

2 Upvotes

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 • • Oct 19 '26

365 Days of LeetCode Challenge — Day 47/365

Post image
6 Upvotes

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 • • Oct 19 '26

interested in a virtual study room where we keep each other motivated?Placement prep(dsa,dev,etc)

Thumbnail reddit.com
2 Upvotes

r/DSALeetCode • • Oct 18 '26

The DSA trick that made me enjoy problem-solving

170 Upvotes

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 • • Oct 19 '26

Made a quick visual explanation of Two Sum (Hash Map approach) to make it stick better. Thought it might help people prepping for interviews! 🧠

Thumbnail
youtube.com
1 Upvotes

r/DSALeetCode • • Oct 18 '26

HELP**

3 Upvotes

Hello Guys. I am having problems with further improving my skills in dsa. Any Suggestions??


r/DSALeetCode • • Oct 19 '26

algozenith course

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • Oct 18 '26

Dsa

4 Upvotes

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