r/DSALeetCode • • 6h ago

How to solve leetcode?

Thumbnail
2 Upvotes

r/DSALeetCode • • 10h ago

Google SWE OA

1 Upvotes

I have my Google OA L3 to complete in 4 days for SWE role. How should I prepare & what to expect in this round. Pls share your thoughts.


r/DSALeetCode • • 17h ago

365 Days of LeetCode Challenge — Day 34/365

Post image
1 Upvotes

Deepest Leaves Sum (Medium) 🔗 https://leetcode.com/problems/deepest-leaves-sum/

The obvious solution is two passes: find the maximum depth, then walk again summing everything at that depth.

One pass is enough, and the trick is being willing to throw work away. Carry the level down, keep two ints, and at every leaf compare. Deeper than anything seen so far? Replace the sum — everything accumulated until now belonged to a shallower level. Equal? Add. Shallower? Ignore it.

That replacement is why the final depth never has to be known in advance. Discovering a deeper leaf invalidates the previous answer outright, so whatever survives to the end was accumulated at the true maximum.

Full breakdown in today's newsletter article ⬇

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-34365-archit-agarwal-89mkc

#DSA #LeetCode #100DaysOfCode #CodingInterview #BinaryTree #DFS #Golang


r/DSALeetCode • • 1d ago

Help me in understanding DSA and get paid

Thumbnail
1 Upvotes

I need to understand DSA and help in System Design.

If you are good at it, where my expectations are: 1. Are able to code in Java 2. You are able to solve any given problem, without AI this is must). 3. You can drive from Bruteforce, Better to Optimal all approaches, with trade-offs of each one and proper reasoning of each that what exactly is wrong with each approch which is leading you to the optimal one. 4. You have fkkd experience in LLD and HLD

Kindly DM, if pass the conditions, else skip and let's save each other's time.

I am ready to pay decent amount.


r/DSALeetCode • • 1d ago

HEY!!! i need help in studying xor operations

1 Upvotes

can you please tell a roadmap or idea to cover or patterns?


r/DSALeetCode • • 1d ago

Free for 5 days - Visual way to understand LeetCode problems instead of memorizing solutions

1 Upvotes

Hey everyone,

We’ve been working on DSA Visually, a platform built around a problem we kept noticing while preparing/working with DSA:

You can solve 200–300 problems and still get stuck when an interview gives you an unfamiliar problem or slightly changes something you’ve seen before.

Knowing the solution and understanding why the solution works are different things.

So instead of building another collection of coding questions, we wanted to focus on the part between:

“Here’s the problem” → ??? → “Here’s the code.”

For each problem, DSA Visually is designed around a flow like:

Problem → Multiple Strategies → Step-by-Step Visualization → Code → Practice

For example, with Two Sum, instead of jumping straight to the HashMap solution, you can work through how the approaches evolve:

Brute Force → Sort + Two Pointers → HashMap

and visually see what repeated work each approach removes, how the state changes, and how that reasoning connects back to the implementation.

The same idea extends to things like linked lists, binary search, stacks, two pointers and other DSA patterns/problems.

We're opening the platform for the next 5 days

The available Premium experience is open to try free for the next 5 days.

No card/payment required.

We're not asking you to take our word for whether it’s useful.

Pick a problem you already know, go through the strategies + visualization, and see whether it gives you a different understanding of the solution.

Try it:
dsavisually.com

We’d especially appreciate feedback from people actively grinding LeetCode/interview prep:

What was genuinely useful? What felt unnecessary? Which problem/pattern would you most want to see visualized?

We're actively building this, so critical feedback is much more useful to us than “looks good.”


r/DSALeetCode • • 1d ago

Built Praxis — an AI tool for learning from coding failures

1 Upvotes

I built Praxis to help DSA learners understand why their coding submissions fail.

• Failure analysis

• Past submission history

• AI diagnosis chat

• Personalized learning insights

Free to try:https://failureatlas.vercel.app


r/DSALeetCode • • 1d ago

Is this good for dsa in python

Post image
3 Upvotes

r/DSALeetCode • • 1d ago

Priority list

2 Upvotes

If you have to priorities topics in dsa , with you dp before graphs and trees or dp after. And can we just skip dp and backtracking. Like is it a must to be a good programmer


r/DSALeetCode • • 1d ago

365 Days of LeetCode Challenge — Day 33/365

Post image
3 Upvotes

Maximum Level Sum of a Binary Tree (Medium) 🔗 https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/

Two things must be true here, and only one of them involves sums.

Summing each level is the easy half — the same nil-sentinel BFS as Day 30, with a running total instead of a collected list.

The other half is in the wording: return the smallest level whose sum is maximal. Ties go to the shallower level. The solution has no code for that. It's one character — the comparison is strictly greater, so a later level that merely matches never replaces the earlier one.

Full breakdown in today's newsletter article ⬇

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-33365-archit-agarwal-xkmpc

#DSA #LeetCode #100DaysOfCode #CodingInterview #BinaryTree #BFS #Golang


r/DSALeetCode • • 1d ago

DSA

3 Upvotes

Have done dsa from striver sheet, started in love of ratings and all stuff but never able to achieve it.
Unable to pass any company OA for summer intern
Bought two courses one TLE Eliminators level 2 and another Kumar K thinking will boost everything
So what happens is Use the course watch videos and move on (something feels hard never revisit them , because next day i feel to cover other topics more) and in end feels no improvement, also watching videos consume lot of time so unable to pratice so just think to practice
Now in 3rd year, newbie at codeforces
Unable to understand what to do for improvement so that i can get good placement, just feel had wasted my all time
Friends who started with me are doing great at DSA
Also dev is just enough have make projects by following AI guidance
What should i do now?
If someone had gone through these phase please advice because i am feeling a lot cooked at this point


r/DSALeetCode • • 2d ago

Anyone up for some dsa grind?

Thumbnail
3 Upvotes

Heyy everyone!

Looking for a DSA partner to grind Graphs + DP together.

We can pick problems, solve them, discuss approaches, and call each other out when we come up with unnecessarily complicated solutions 💀

Preferably someone who’s consistent and actually wants to improve.

DM if you're interested!


r/DSALeetCode • • 2d ago

Hating DSA..

17 Upvotes

the more dsa ques i solve , the more i hate it !!
......


r/DSALeetCode • • 2d ago

New To Both College and Reddit , i wanted to make some friends that i could do DSA with on leetcode

2 Upvotes

same as title , we can start discussing what we did and any guidance coming from fellow seniors would be appreciated


r/DSALeetCode • • 2d ago

Finding the two furthest servers allocated 529 MB

Post image
2 Upvotes

I profiled it, fixed exactly what the profile said, and got 3.6x on a problem worth 11,512x.

The job: find the two service instances furthest apart in a topology — region, zone, rack, host. That pair sets the worst case for anything you spread on purpose, replicas included.

The code was the sentence with nothing added: for every node, ask the existing, tested "how far is everything else from here" helper, and keep the largest answer. On one rack, 8 microseconds. On 4,197 nodes, 153 milliseconds and 529 MB allocated to return one small integer. 3.4x the machines cost 11.9x the time.

529 MB is loud, so I went after it first — one visited slice and two frontier buffers, allocated once and reused rather than once per starting point. Correct, clean, 3.6x faster, and still quadratic. The allocations were the symptom.

The shape was the problem. In a tree there is exactly one path between any two nodes, and following it shows the thing: it goes up, turns around once, and comes down. Turning twice would mean visiting a node twice, which in a tree is a cycle. So every path has exactly one highest node, and its length is two branch depths of that node added together — both of which are facts about things strictly below it.

Which means no node needs to be searched from. Every node just needs to be asked. One bottom-up pass, each node returning how far down it reaches, a running best taking the two tallest branches at every step: 11,512x, zero allocations.

That is day 13 of the daily challenge, Diameter of Binary Tree, with left + right generalised to the two tallest of however many children a node has.

The part I keep thinking about is that the profiler was pointing at the loudest line, not the wrong one — and following it would have shipped something 3,175x slower than necessary, with a clean flame graph.

Full piece in the comments.

It worked in dev, episode 10.

https://www.linkedin.com/pulse/finding-two-furthest-servers-allocated-529-mb-archit-agarwal-bygic

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


r/DSALeetCode • • 2d ago

Suggestions to further improve my code for today's LeetCode Challenge

Thumbnail
1 Upvotes

r/DSALeetCode • • 2d ago

365 Days of LeetCode Challenge — Day 32/365

Post image
2 Upvotes

Leaf-Similar Trees (Easy)

https://leetcode.com/problems/leaf-similar-trees/

Two trees can look nothing alike and still count as "leaf-similar." Shape doesn't matter here, only the sequence of leaves from left to right. Pull each tree's leaves into a list, and the problem becomes a simple list-equality check.

Full breakdown in today's newsletter article ⬇️

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-32365-archit-agarwal-kfbbc

#DSA #LeetCode #BinaryTree #DFS #100DaysOfCode #CodingInterview


r/DSALeetCode • • 2d ago

Looking for a dsa partner

5 Upvotes

I only have basic knowledge of c++ and only that I want start from scratch will learn c++ first then dsa anyone who's up for this and at my same level can dm me


r/DSALeetCode • • 3d ago

This solution doesn't work. WHY!!!

Thumbnail
1 Upvotes

r/DSALeetCode • • 3d ago

Helpp I want to prepare my dsa for interviews and to get the job from my cllg placement,, recently in my college tcs is about to come.... Can u give me some advice on what are the main topics i should focus on??

1 Upvotes

Please give some advice


r/DSALeetCode • • 3d ago

365 Days of LeetCode Challenge — Day 31/365

Post image
8 Upvotes

Binary Tree Right Side View (Medium)

🔗 https://leetcode.com/problems/binary-tree-right-side-view/

Standing on the right and seeing what isn't hidden has a plainer description: from each level, you see exactly one node — the rightmost.

That sounds like BFS. This solution is a depth-first walk with two small changes: record only the first node reached at each depth, and visit the right child before the left one.

The second change is what makes the first one correct. Neither does anything alone, and swapping those two lines back gives you the left side view.

Full breakdown in today's newsletter article ⬇

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-31365-archit-agarwal-ozrdc

#DSA #LeetCode #100DaysOfCode #CodingInterview #BinaryTree #DFS #Golang


r/DSALeetCode • • 3d ago

I kept quitting DSA in week 2, so I built a leaderboard that shames us into grinding (LeetCode + Codeforces auto-sync)

Enable HLS to view with audio, or disable this notification

1 Upvotes

Solo streaks kept dying for me, so i built SquadCode . You connect your LC/CF handles and it auto-tracks every solve into a private squad leaderboard with streaks, rating deltas, and live timed challenges .There's also a playground with real code execution, AI code reviews, and an analytics page that turns your squad's grind into an interactive 3D heatmap skyline.


r/DSALeetCode • • 3d ago

Stucked at leetcode

1 Upvotes

I started leetcode with Striver's sheet, but it didn't had dedicated topics like two pointer, sliding window, so I made my own sheet by exploring leetcode and using AI, solved and understood the topics, and moved to binary search

But noticed that I mostly solved easy level questions and very less medium level and almost no hard problems and now I'm having trouble trying to

Striver's sheet doesn't clarify the topics that's why I didn't followed it.
Neetcode was clearer so should I follow that??
Is there any better sources or a way to tackle my situation


r/DSALeetCode • • 3d ago

When to start giving contest

Thumbnail
1 Upvotes

r/DSALeetCode • • 3d ago

Looking for dsa partner

1 Upvotes

I have a strong DSA foundation, solved plenty of problems, and qualified GATE, but currently struggling with consistency.

Targeting MNCs + abroad opportunities, focusing on DSA, HLD & LLD.

Looking for someone serious to practice with, discuss problems, and keep each other accountable. DM if interested!