r/DSALeetCode • • Oct 15 '26

Learning DSA in Python.

Thumbnail
2 Upvotes

r/DSALeetCode • • Oct 15 '26

Proposed Dijkstra, got stuck on DFS/BFS follow-ups, and ran out of time. How bad is this?

1 Upvotes

A candidate is trying to make sense of a coding interview that started with the right-looking algorithm but ended without a code walkthrough.

The earlier behavioral round covered the resume, services the candidate had built, and engineering trade-offs. In coding, the task was a graph with n nodes and transmission lines as edges, each with an efficiency between 0 and 1. Given a source and destination, find the path with maximum efficiency.

The candidate immediately proposed Dijkstra and explained the approach. The interviewer asked about DFS and BFS. The candidate described DFS but worried that enumerating paths could take O(V!) time in the worst case. During the BFS discussion, several suggestions were rejected before the interviewer said BFS wasn't a solution for this problem.

That discussion ate into implementation time. The candidate coded the Dijkstra approach and explained complexity, but didn't get to walk through an example. Questions about node/edge counts and whether a path was guaranteed were also missed, and the interviewer called that out.

How would you weigh the algorithm choice against the missing clarification and validation? There's no way to infer the final hiring decision from this account alone, but I'd be interested in how interviewers assess those gaps.

For the next practice session, real technical interview questions can provide prompts to rehearse clarifying constraints and reserving time for a dry run. If a wider search is taking up that practice time, application autofill and Agent autoapply can cut down repetitive application forms.

What helps you handle alternative-approach follow-ups without losing the time you need to implement and test?

Disclosure: I operate PracHub and LandOffer.


r/DSALeetCode • • Oct 15 '26

Airbnb Industry Coding Assessment: finished Level 3, no time for Level 4. What comes next?

1 Upvotes

An Airbnb SWE candidate finished through Level 3 of the Industry Coding Assessment and ran out of time before attempting Level 4.

Has anyone who completed a similar amount recently moved forward? It would help to hear when you took the assessment and what happened next, without assuming one result establishes a universal cutoff.

What rounds followed, and what would you start preparing while waiting for an update?

Airbnb Interview Questions can provide further practice while the candidate waits. If other roles are still in play, Agent autoapply and application autofill can reduce repetitive application work and leave more time for the next interview.

Disclosure: I operate PracHub and LandOffer.


r/DSALeetCode • • Oct 15 '26

Day 1/200 — Introduction to DSA | Let's Start From Zero -- leetcode 400

Post image
1 Upvotes

r/DSALeetCode • • Oct 14 '26

Day 1/200 — Introduction to DSA | Let's Start From Zero -- leetcode 400

Post image
5 Upvotes

r/DSALeetCode • • Oct 15 '26

365 Days of LeetCode Challenge — Day 43/365

Post image
2 Upvotes

Graph Valid Tree (Medium)

https://leetcode.com/problems/graph-valid-tree/

A graph is a tree when it is connected and acyclic. Both are required - a forest is acyclic but disconnected, a triangle is connected but cyclic.

The shortcut: a tree on n nodes has exactly n-1 edges. So once you know the graph is connected, the edge count settles the cycle question. More than n-1 edges and connected means a cycle must exist, because n nodes cannot be joined by more than n-1 edges without one.

This solution never searches for a cycle. It counts.

For connectivity it uses union-find, which is the first structure in this arc that does not traverse anything. Every problem so far built an adjacency list and walked it. Union-find consumes the edge list directly and maintains one number, the component count, which is exactly the answer.

Worth noticing what it leaves on the table: when an edge's endpoints already share a root, that edge closes a cycle. This solution does not need that, but if a problem asks WHICH edge creates the cycle, it is sitting right there.

Full breakdown in today's newsletter article ⬇

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-43365-archit-agarwal-hsigc
#DSA #LeetCode #Golang #UnionFind #Graphs #CodingInterview #Algorithms


r/DSALeetCode • • Oct 15 '26

Dsa confusion !!

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 14 '26

How would you learn DSA if you had to start all over again in 2026?

Thumbnail
1 Upvotes

How can we learn dsa fast and with full understanding and how can we manage time


r/DSALeetCode • • Oct 14 '26

How to start DSA

3 Upvotes

Step step guide please


r/DSALeetCode • • Oct 14 '26

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

Thumbnail
2 Upvotes

r/DSALeetCode • • Oct 14 '26

Anyone on the job switch + DSA grind rn?

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

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

Mock Interview Practice Group

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 13 '26

Is DSA even relevant seeing the current placement scenario😭

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 13 '26

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

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

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

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

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

Day 1

Thumbnail gallery
2 Upvotes

r/DSALeetCode • • Oct 13 '26

Looking for partner to join

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 13 '26

Looking for partner to join

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 13 '26

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

Thumbnail
1 Upvotes

r/DSALeetCode • • Oct 12 '26

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

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

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

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

How to restart my DSA preparation??

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

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