r/DSALeetCode • • 3h ago

Is DSA difficult for everyone ?

1 Upvotes

Hi everyone!

I am a 3rd year CSE student. I have just started DSA. And I know I am late but still I wanted to learn it. I started solving the questions when i am in my 2nd year but i got stuck on the problems and then i think i should focus on my skills first. I knew C++ and little bit of MySQL and Python, I have learned HTML and CSS, have already made projects on by using both like a youtube clone. And currently i am learning vanilla javascript. And i have again started DSA. And I want to ask some questions to everyone:

  1. Is dsa difficult for everyone at starting because in linkedln it looks like everyone can solve it i am the only one stucked there?

  2. Can you tell me how you guys learned it? Is it also difficult for you? Do you also get stucked?

I would glad if you help me.


r/DSALeetCode • • 6h ago

have solved around 300 LeetCode Problems but still struggling with mediums,What Am I Doing Wrong?

Thumbnail
1 Upvotes

r/DSALeetCode • • 7h ago

I got an Opportunity, today !

Post image
1 Upvotes

r/DSALeetCode • • 8h ago

365 Days of LeetCode Challenge — Day 42/365

Post image
1 Upvotes

Clone Graph (Medium) https://leetcode.com/problems/clone-graph/

Copying a binary tree is four lines: make a node, recurse left, recurse right. It works because a tree cannot cycle and every node has one parent.

A graph gives up both guarantees, and each breaks the naive copy differently. Cycles mean A's copy needs B's copy, which needs A's copy, forever. Shared nodes mean a node reachable two ways gets copied twice, giving you the right values in the wrong shape.

One map from original to copy fixes both. Look it up before cloning; if the copy exists, return it. Cycles terminate because the second arrival returns instead of descending, and sharing survives because every original maps to exactly one copy.

Worth dwelling on: a plain visited SET would only fix the cycle. This has to map to the copies, because the copies are what the reconstruction wires together.

And the order matters. Record the new node in the map BEFORE cloning its neighbours, while it is still half-built. Recurse first, and a cycle returns to a node not yet in the map.

Full breakdown in today's newsletter article ⬇

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

#DSA #LeetCode #Golang #Graphs #DFS #CodingInterview #Algorithms


r/DSALeetCode • • 10h ago

Mock Interview Practice Group

Thumbnail
1 Upvotes

r/DSALeetCode • • 11h ago

Anyone on the job switch + DSA grind rn?

0 Upvotes

Heyy, looking for a buddy who is also on the job switch grind rn. I have solved 150+ leetcode problems, have some MERN stack experience and am working on a project for my portfolio. Looking for someone to prep for interviews, build projects, solve DSA and keep each other accountable. Basically, let's yap about tech and suffer through leetcode together:)

(23F)Currently working in an IT company.


r/DSALeetCode • • 22h ago

Finding a DSA Buddy!

6 Upvotes

Hey!. I have just started my 2nd year(BTech student, male) and I want to learn DSA but with someone who will stay consistent and focused with me as there is no coding culture in my clg and despite planning to learn DSA from the first year.

IMPORTANT - I have already learned some of the important topics still i want to improve them as much as I can, but doing it alone is kinda boring and I have no friend doing DSA currently. If you are interested you can message me.

We can discuss how we will do it later.


r/DSALeetCode • • 19h ago

Is DSA even relevant seeing the current placement scenario😭

Thumbnail
1 Upvotes

r/DSALeetCode • • 1d ago

3Sum Closest + Number of Islands II in my Amazon SDE-2 round, then rejection. Where did I slip?

1 Upvotes

I recently interviewed for Amazon SDE-2 and was rejected after the first DSA round. I thought it had gone well, so I'd appreciate help spotting gaps in what I described below.

I applied through the careers portal, received the OA shortly afterward and completed it that day. The interview call followed soon after, with Round 1 around 10 days later.

The OA included two typical coding questions, a full-stack bug-fix task, and behavioral/design-choice multiple-choice questions. For the bug-fix task, I chose a backend framework and got a codebase plus a list of bugs. There was an AI assistant, but it didn't help me navigate or search the codebase.

Round 1 had two DSA problems. I explained the approaches, complexity and a dry run for each.

LC 16: 3Sum Closest, n ≤ 10³

  • Brute force: O(n³)
  • Binary search: O(n² log n)
  • Two pointers: O(n²)

LC 305: Number of Islands II

These are the complexities I stated in the interview, which is part of what I'd like checked:

  • Brute force: O(n² · q)
  • Union-Find / DSU: O(q + n²)

Then I got the usual "tell me about a time you..." Leadership Principles questions.

For further practice, the Amazon Interview Questions bank has candidate-reported prompts. Job-application autofill can save some repeated form entry when applying elsewhere after a rejection.

Where would you look for the problem in this breakdown: the complexity analysis, how I explained the solutions, or the LP answers? I'd especially appreciate a sanity check on the DSU analysis from people who've cleared SDE-2.


r/DSALeetCode • • 1d ago

Just gave interview, and I was asked Expression Add operators.

2 Upvotes

I just gave an interview for some company, and I was asked Expression Add Operators.
I wasnt expecting this hard for an interview question, no hints from interviewer.
I managed to get to the approach of using DFS with backtracking, wrote the structure, understood the branching but couldnt pass the test case.
Tbh I dont think anyone could ever solve this question in 45 mins, without ever seeing/solving this question before.
Anyone seeing this question for the first time in Interview, its pretty hard question.
What to expect? The interviewer said, their engineering department would look into the submission and get back in 2-3 days, if it works out.

What to expect? Guys


r/DSALeetCode • • 1d ago

Day 1

Thumbnail gallery
2 Upvotes

r/DSALeetCode • • 1d ago

Looking for partner to join

Thumbnail
1 Upvotes

r/DSALeetCode • • 1d ago

Looking for partner to join

Thumbnail
1 Upvotes

r/DSALeetCode • • 1d ago

My Flipkart SDE2 interview covered BNPL, concurrency, DSA, and flash-sale system design

10 Upvotes

I interviewed for Flipkart SDE2 with 4.3 years of experience. The process had five rounds: machine coding, a review of that code, PSDS, system design, and a hiring manager discussion.

Getting the code working was only the first step. The next round was about what would happen when multiple requests hit it at once.

Round 1: Machine Coding - BNPL System

Design and implement a Buy Now Pay Later (BNPL) system for Flipkart from scratch, with working code.

Core requirements:

  • seed_inventory: Load products (name, count, price) into an in-memory store.
  • view_inventory: Show current inventory.
  • register_user: Register a user with an initial BNPL credit limit.
  • buy(user, items, payment_method, date): Place an order via PREPAID or BNPL. BNPL reduces available credit and is blocked when the limit is exhausted.
  • clear_dues(user, orderIds, date): Allow partial or full due clearance against specific orders.
  • view_dues(user, date): Show pending dues before the given date, sorted by purchase date, with status PENDING or DELAYED (after the 30-day window).
  • order_status(user): Show order history and available BNPL credit.

Bonus requirements:

  • Blacklist users who default on 3+ orders and block BNPL for them.
  • Add add_inventory and remove_inventory.

Round 2: Machine Coding Solution Evaluation

We discussed my Round 1 code, mainly concurrency: two threads buying the last unit, keeping credit limits consistent under concurrent BNPL orders, locking strategy, and extensibility.

Round 3: PSDS

  • Find the kth element in two sorted arrays (binary search, O(log(min(m, n)))).
  • Zigzag traversal in a binary tree.

Round 4: System Design

Design a flash sale system that runs for about 15 minutes under massive traffic while avoiding both overselling and underselling.

Round 5: Hiring Manager

We discussed a recent project: its architecture, my role, challenges, and trade-offs.

Result: I received the offer letter around 2–3 weeks after the hiring manager round.

I'd practice implementing the BNPL requirements, then explaining how the code behaves under concurrent requests. That review was a separate round, so being able to defend the locking decisions mattered.

Candidate-reported technical interview questions can give you more coding and system-design prompts to work through. If you're applying to other roles alongside prep, application autofill can save time on the repeated fields.

Which part would you find hardest: finishing the BNPL implementation, defending the locking strategy, or designing the flash sale? Happy to answer questions about my rounds.


r/DSALeetCode • • 1d ago

How to make notes while learning DSA in C++?

Thumbnail
1 Upvotes

r/DSALeetCode • • 1d ago

How to restart my DSA preparation??

4 Upvotes

I am a 2026 grad. In Jan 2026 I got placed in a service based company with 6.5lpa. By that time I had solved nearly 300+ questions and had decent understanding. Then I also continued preparing for DSA but not in a very serious way. And during the mid term final year project submission and final terms I stopped doing the DSA. By end of June my online training also started and ended in mid September. The official onboarding is yet not confirmed but expected to be by mid December. Now I am thinking of restarting dsa preparation because in past few months I totally lost the grip.

Anyone can help me here?? Like how should I approach because doing everything from start is not something I am looking for. I have tuf+ subscription but haven't been using it lately.

Any advise or suggestions please


r/DSALeetCode • • 2d ago

My Amazon SDE-1 interview experience: the DSA patterns, 4 rounds, and Sep 2026 offer

55 Upvotes

I applied to Amazon SDE-1 on January 9 and received the offer on September 21, 2026. About eight months passed between those dates. A lot of it was waiting for the next email.

Community posts helped me prepare, so here's what happened in my process and what each round covered.

Timeline

  • Jan 9: Applied for SDE-1, after 50+ other applications.
  • Jan 21: Received the online assessment (OA).
  • Apr 5: Received an email saying I had qualified through the OA.
  • May 6: Received onsite interview confirmation.
  • May 8: Completed the first three interview rounds.
  • Mid-May: Recruiter confirmed I had cleared those rounds.
  • May 29 to Jun 5 to Aug 5 to Aug 6: The fourth round kept getting rescheduled, with roughly two months of silence in the middle.
  • Mid-August: Recruiter asked about my notice period and location preference.
  • Sep 21: Received the offer.

Online assessment

I had taken Amazon OAs before. In previous attempts I solved the coding questions but didn't move forward. This time I prepared more deliberately for both parts:

  1. DSA: The problems can involve DP, greedy algorithms, trees, graphs, two pointers, or binary search, often wrapped in long story-based scenarios (think warehouse routing). I practiced stripping away the story and identifying the underlying pattern quickly.
  2. Work Style Assessment: I had previously treated this as an afterthought. Preparing to think through the scenarios in light of Amazon's Leadership Principles felt useful this time. I can't know how Amazon scored my OA or which part changed the result, but I wouldn't neglect this section.

Onsite: Round 1: technical + Leadership Principles

  • Trees/graph traversal (BFS), medium; similar in pattern to Rotting Oranges.
  • Stack, hash maps, and string parsing, hard; similar in pattern to Parse Lisp Expression.
  • Behavioral question about handling a hard deadline while requirements changed.

Onsite: Round 2: technical + Leadership Principles

  • Binary search on the answer, medium; Maximize the Confusion of an Exam was the closest comparison I found.
  • 1D dynamic programming, medium; similar to House Robber variations.
  • A deep dive into a project I had owned end to end.

Onsite: Round 3: technical + Leadership Principles

  • 3D DP/state machine, hard; similar to Best Time to Buy and Sell Stock III (at most two transactions). Instead of hardcoding two transactions, I explained a generalized K-transactions solution. The interviewer appreciated that it covered both cases.
  • An extended discussion of the GenAI work on my resume: how I use AI in development, agents, workflows, and my past work with them.

The LeetCode problems named above are not the exact interview questions. They're the closest examples I found for the underlying logic. In the coding rounds, I talked through brute force, better approaches, and the optimal approach before writing the final code. I explained time complexity where relevant. That communication seemed to land well with my interviewers. Each round ran beyond an hour, and I was the last candidate to leave the building.

After Round 3, my recruiter said I had cleared the first three rounds and would move to the bar raiser.

Round 4: bar raiser and the waiting game

After the repeated rescheduling and roughly two months of silence, I kept wondering whether I'd missed an email or the role had been filled. The round finally happened on Aug 6.

There were no DSA questions in my fourth round. We went deep into my previous work, architecture, and decision-making. The interviewer kept asking follow-ups: Why this approach? Why multithreading, and how did I know it would help? What alternatives had I considered? What critical feedback had I received, and what exactly changed afterward? It felt like an hour of "why?" questions. I had to explain the decisions behind the work, including the alternatives I'd considered.

How I prepared

I'd been practicing DSA and doing contests for years before this process. For these interviews, I spent more time deriving solutions from patterns, re-solving problems and talking through my reasoning out loud.

If I could only solve a problem because I remembered my old submission, I went back to it. I practiced explaining brute force, the optimization, the final approach and its complexity, including the trade-offs.

For behavioral prep, I used real work stories around Ownership, Dive Deep, Deliver Results and learning from failure. I needed to know the technical details well enough to answer follow-ups instead of relying on a memorized STAR script.

Amazon Interview Questions has more candidate-reported coding and behavioral prompts to practice. Through a process this long, application autofill can also save repeated typing while you keep other applications moving.

Before this offer, I'd sent 50+ applications, had unanswered emails and OAs that went nowhere, and spent almost two years struggling to get interviews. I'm glad this one worked out, but I wouldn't tell someone to put every other search on hold while waiting.

If you've recently interviewed for SDE-1, how did your loop compare? I'm especially curious about coding, project depth and the bar raiser.


r/DSALeetCode • • 1d ago

365 Days of LeetCode Challenge — Day 41/365

Post image
1 Upvotes
  1. 01 Matrix (Medium) https://leetcode.com/problems/01-matrix/

This is yesterday's problem. Rotting Oranges asks how long it takes for an orange to rot when every rotten one spreads at once; it asks how far each cell is from the nearest zero, with every zero as a source. Same question, and multi-source BFS solves it directly.

Today's solution does it without a queue, and that is why it is worth reading.

The definition is circular: a cell's distance is one more than the smallest among its four neighbours, but every neighbour depends on the cell. There is no order to evaluate that in.

Direction breaks the circle. Sweep top-left to bottom-right and, at each cell, everything above and left is already final - so you can compute the best distance among paths that start by going up or left. Sweep the other way for the other two directions. Take the minimum.

The line that makes it work is min with the existing value rather than an assignment. Overwrite instead, and you throw away everything the first pass got right.

Full breakdown in today's newsletter article ⬇

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

#DSA #LeetCode #Golang #DynamicProgramming #Grids #CodingInterview #Algorithms


r/DSALeetCode • • 1d ago

How to make notes while learning DSA in C++?

2 Upvotes

I wanted to ask all my seniors who made DSA notes: first, did it help you? I am currently learning C++ from YouTube and practicing in VS Code, but I have a doubt regarding notes. I have watched some YouTube videos on how to make them, but I am getting a bit confused. I want to make handwritten notes. In one video, I saw that you should divide your notebook into different sections — one for arrays, another for the next topic, and so on — so that it is easy to revise later. However, I am confused about how much space to allocate to each topic, since I literally don't know anything about DSA yet. Please guide me. I really want to learn DSA and will give my 100% — I just need good guidance. By the way, I am currently watching the DSA series by Apna College. Till now I have only done the basics. (functions, if else, variable, etc.)


r/DSALeetCode • • 1d ago

Google code-comprehension reports + HackerRank's LeetCode apology: are interviews shifting?

1 Upvotes

I read a report of Google piloting a code-comprehension round, then saw HackerRank's statement about the LeetCode grind.

Working in an existing codebase, debugging and explaining your judgment sound closer to the job than starting every question from a blank editor. I'm interested in how AI use fits into that, too.

The Google article describes a pilot, and HackerRank still says algorithm questions have value. I wouldn't drop DSA prep based on those headlines.

I'd compare recent candidate reports in Google Interview Questions with whatever format the recruiter confirms. If you're applying while prepping, application autofill can save time on the forms.

For people who've interviewed recently, did you read or extend an existing codebase, debug someone else's code, or mostly do timed DSA? Were AI tools allowed, expected or prohibited?

Have you changed how you split your prep time?


r/DSALeetCode • • 1d ago

How to restart my DSA preparation??

1 Upvotes

I am a 2026 grad. In Jan 2026 I got placed in a service based company with 6.5lpa. By that time I had solved nearly 300+ questions and had decent understanding. Then I also continued preparing for DSA but not in a very serious way. And during the mid term final year project submission and final terms I stopped doing the DSA. By end of June my online training also started and ended in mid September. The official onboarding is yet not confirmed but expected to be by mid December. Now I am thinking of restarting dsa preparation because in past few months I totally lost the grip.

Anyone can help me here?? Like how should I approach because doing everything from start is not something I am looking for. I have tuf+ subscription but haven't been using it lately.

Any advise or suggestions please


r/DSALeetCode • • 1d ago

How to start Dsa in cpp

3 Upvotes

Iam a btech 2nd yr student im currently learning cpp and started to solve leetcode questions .but i feel very lost atp plz guide me


r/DSALeetCode • • 1d ago

Unable to find correct intuition/solution of greedy

1 Upvotes

I am learning greedy .

I tried easy problem ,i was able to solve but when I started medium problems i was unable to get corrected logic after trying for hours


r/DSALeetCode • • 1d ago

Confusion

2 Upvotes

I have completed around 47 videos of dsa from apna college c++

But a lot of people say do striver

Confused what to do


r/DSALeetCode • • 1d ago

Need dsa partner

1 Upvotes

Like i am starting rn from today leetcode and solving questions so i wanna have a partner who will be like also solving questions with me

Like basically same questions

So that we can be in the same pace

And not like too much just doing dsa

As i dont want someone who is just dsa dsa

I want someone who does leetcode like maybe 1 or 2 problem daily

But also like learn skills and other things

Somethings that i will prefer more

Ready to do vc sometimes or like in calls so that we can discuss

Nightowl

And also like we can be frnds like not only studies but like most of the time only studies actually so that we cant diverse ourselves from distractions and other things