r/datastructures • • Jul 15 '26 Obsessed Bravo Heartwarming Mindblown

DSA Preparation Roadmap (From Zero to OA Ready)

913 Upvotes
  1. Sliding Window: 3, 76, 209, 424, 567, 904

  2. Two Pointers: 11, 15, 16, 18, 42, 167

  3. Fast/Slow Pointers (Linked List): 141, 142, 19, 876, 160, 234

  4. Binary Search on Sorted Data: 33, 34, 35, 153, 162, 704

  5. Binary Search on Answer: 875, 1011, 410, 774, 1283, 1482

  6. Hashing / Frequency Maps: 1, 49, 128, 217, 242, 347

  7. Prefix Sum / Running Sum: 303, 560, 724, 930, 974, 523

  8. Difference Array / Range Updates: 370, 1094, 1109, 1893, 1943, 2381

  9. Monotonic Stack: 739, 496, 503, 84, 85, 901

  10. Monotonic Queue / Deque: 239, 862, 1425, 1438, 1499, 1696

  11. Heap / Top K: 215, 347, 692, 703, 973, 1046

  12. Intervals: 56, 57, 252, 253, 435, 452

  13. Greedy Scheduling / Sorting: 45, 55, 406, 621, 763, 134

  14. Linked List Manipulation: 21, 23, 24, 25, 92, 138

  15. Tree DFS: 104, 112, 113, 543, 124, 226

  16. Tree BFS / Level Order: 102, 103, 199, 515, 637, 116

  17. BST Problems: 98, 99, 230, 235, 450, 700

  18. Backtracking Basics: 46, 47, 77, 78, 90, 39

  19. Backtracking with Constraints: 40, 17, 79, 131, 51, 52

  20. Graph BFS / DFS: 200, 695, 733, 994, 1091, 1254

  21. Topological Sort / DAG: 207, 210, 802, 1462, 1203, 2115

  22. Union Find / DSU: 547, 684, 1319, 1579, 990, 1202

  23. Shortest Path: 743, 787, 1514, 1631, 1334, 1976

  24. MST / Graph Greedy: 1584, 1135, 1168, 1489, 778, 1102

  25. Trie: 208, 211, 212, 648, 677, 1268

  26. Bit Manipulation: 136, 137, 191, 338, 268, 190

  27. 1D DP Basics: 70, 198, 213, 322, 279, 300

  28. Knapsack / Subset DP: 416, 494, 518, 474, 1049, 879

  29. Grid DP: 62, 63, 64, 221, 931, 120

  30. String DP / Sequence DP: 1143, 72, 115, 583, 97, 1312

How to use this list?ย 

- These numbers are Leetcode problem numbers

- Do 3 patterns at a time, not all 30 together.

- For each pattern, solve the first 2 to understand the idea, the next 2 to get repetition, and the last 2 to stretch yourself.

- After every pattern, write one reusable template from memory.

- Do not just โ€œsolve and move on.โ€ Ask: what signal in the question pointed to this pattern?

- If you get stuck, revisit the same pattern after 3 to 4 days. Pattern recognition is built by spacing, not cramming.


r/datastructures • • Sep 14 '26 Bravo

i think i wasted a lot of time solving leetcode

Post image
606 Upvotes

for a long time i thought the way to get better at dsa was pretty simple

solve more problems.

so i did..

100 became 200
then 300
then 400+

but at some point someone asked me:

"what are ur weakest dsa patterns?"

i genuinely didn't know.

i knew my solve count.
i knew my rating.
i could tell you which sheets i'd done.

but if you gave me a blank page and asked me to write down the 3 patterns i was actually bad at, i'd probably just sit there lol.

then i started paying attention to something else.

sometimes i'd solve 5 problems from the same pattern and still get stuck on basically the same idea.

meanwhile i'd look at my profile and think "damn.. 450+ solved. i'm doing pretty good."

but then i'd get stuck on some random medium i've basically seen before ๐Ÿ˜ญ

how do you guys actually know when you've learned a pattern?

is it after 5 problems?
10?
when you can recognize it without hints?

because i'm starting to think solve count doesn't really tell you that much.

that's actually what made me build GrindLens.

i wanted to know what i'd actually learned, where i was still weak, and what i should solve next.

so it looks at your leetcode history and tries to surface those gaps instead of just giving you another number.

it's live now if anyone wants to try it:

grindlens.dev

kinda curious what yours looks like lol


r/datastructures • • 27d ago

System Design Resources

Post image
562 Upvotes

Can someone please tell me the resources for the system design from basics ?


r/datastructures • • Aug 03 '26 Bravo

Master these 25 DSA patterns

517 Upvotes

You don't need to solve 1,000 LeetCode questions. You need to master these 25 DSA patterns.

Here is a full cheat sheet built from problems that kept repeating across 200+ MAANG+ interview experiences.

[1] Sliding window

LC: 3, 76, 209, 424, 567, 904

โ†’ Use when the problem asks for a longest, shortest, or valid contiguous range.

[2] Two pointers

LC: 11, 15, 16, 18, 42, 167

โ†’ Look for sorted arrays, pair conditions, or movement from both ends.

[3] Fast and slow pointers

LC: 19, 141, 142, 160, 234, 876

โ†’ Best for linked-list cycles, middle nodes, and pointer gaps.

[4] Binary search

LC: 33, 34, 35, 153, 162, 704

โ†’ Use when the search space is sorted or partially ordered.

[5] Binary search on answer

LC: 410, 774, 875, 1011, 1283, 1482

โ†’ Guess an answer, test feasibility, then shrink the range.

[6] Hashing

LC: 1, 49, 128, 217, 242, 347

โ†’ Use for quick lookup, frequency counting, grouping, and duplicate checks.

[7] Prefix sum

LC: 303, 523, 560, 724, 930, 974

โ†’ Convert repeated range-sum work into constant-time lookups.

[8] Difference array

LC: 370, 1094, 1109, 1893, 1943, 2381

โ†’ Use when many updates affect entire ranges.

[9] Monotonic stack

LC: 84, 85, 496, 503, 739, 907

โ†’ Look for next greater, next smaller, span, or rectangle problems.

[10] Stack parsing

LC: 20, 71, 150, 224, 394, 735

โ†’ Useful for expressions, nested structures, paths, and collision simulation.

[11] Queue and deque

LC: 239, 346, 362, 622, 641, 933

โ†’ Use for rolling windows, ordered processing, and recent-event tracking.

[12] Intervals

LC: 56, 57, 252, 253, 435, 986

โ†’ Sort by start or end time, then merge, count, or remove overlaps.

[13] Heap and top K

LC: 23, 215, 295, 347, 373, 973

โ†’ Use when you repeatedly need the smallest, largest, or top K elements.

[14] Grid and graph BFS

LC: 127, 200, 286, 542, 752, 994

โ†’ BFS is the default for shortest steps in an unweighted graph.

[15] Backtracking

LC: 39, 46, 78, 79, 90, 131

โ†’ Choose, explore, undo. Use when all valid combinations must be generated.

[16] Tree DFS

LC: 98, 100, 104, 110, 124, 236

โ†’ Decide what information each subtree should return to its parent.

[17] Tree BFS

LC: 102, 103, 199, 515, 637, 662

โ†’ Use when the answer depends on levels, width, or visible nodes.

[18] Trie

LC: 208, 211, 212, 421, 648, 720

โ†’ Use for prefixes, dictionaries, word search, and bitwise prefix matching.

[19] Union find

LC: 200, 261, 305, 547, 684, 721

โ†’ Use for dynamic connectivity, grouping, and cycle detection.

[20] Topological sort

LC: 207, 210, 269, 310, 1136, 1203

โ†’ Look for prerequisites, dependencies, ordering, or build sequences.

[21] Greedy

LC: 45, 55, 134, 435, 621, 763

โ†’ Make the best local choice only when you can justify why it stays safe.

[22] One-dimensional DP

LC: 70, 139, 198, 213, 300, 322

โ†’ Define the state clearly, then connect it to smaller states.

[23] Two-dimensional DP

LC: 62, 63, 64, 72, 221, 1143

โ†’ Use when the state depends on two changing inputs or positions.

[24] Knapsack and subset DP

LC: 416, 474, 494, 518, 879, 1049

โ†’ Look for choosing items under a limit, target, or capacity.

[25] Bit manipulation

LC: 136, 191, 231, 268, 338, 371

โ†’ Learn XOR, masks, shifts, set-bit checks, and subset representation.

Do not solve these as 150 unrelated questions.

For every problem, write down:

โ†’ Which pattern gave it away?

โ†’ What changed from the standard version?

โ†’ What would break the current solution?

โ†’ Can you recognize the pattern within 90 seconds?


r/datastructures • • Aug 03 '26 Mindblown

Master these 25 DSA patterns

245 Upvotes

You don't need to solve 1,000 LeetCode questions. You need to master these 25 DSA patterns.

Here is a full cheat sheet built from problems that kept repeating across 200+ MAANG+ interview experiences.

[1] Sliding window

LC: 3, 76, 209, 424, 567, 904

โ†’ Use when the problem asks for a longest, shortest, or valid contiguous range.

[2] Two pointers

LC: 11, 15, 16, 18, 42, 167

โ†’ Look for sorted arrays, pair conditions, or movement from both ends.

[3] Fast and slow pointers

LC: 19, 141, 142, 160, 234, 876

โ†’ Best for linked-list cycles, middle nodes, and pointer gaps.

[4] Binary search

LC: 33, 34, 35, 153, 162, 704

โ†’ Use when the search space is sorted or partially ordered.

[5] Binary search on answer

LC: 410, 774, 875, 1011, 1283, 1482

โ†’ Guess an answer, test feasibility, then shrink the range.

[6] Hashing

LC: 1, 49, 128, 217, 242, 347

โ†’ Use for quick lookup, frequency counting, grouping, and duplicate checks.

[7] Prefix sum

LC: 303, 523, 560, 724, 930, 974

โ†’ Convert repeated range-sum work into constant-time lookups.

[8] Difference array

LC: 370, 1094, 1109, 1893, 1943, 2381

โ†’ Use when many updates affect entire ranges.

[9] Monotonic stack

LC: 84, 85, 496, 503, 739, 907

โ†’ Look for next greater, next smaller, span, or rectangle problems.

[10] Stack parsing

LC: 20, 71, 150, 224, 394, 735

โ†’ Useful for expressions, nested structures, paths, and collision simulation.

[11] Queue and deque

LC: 239, 346, 362, 622, 641, 933

โ†’ Use for rolling windows, ordered processing, and recent-event tracking.

[12] Intervals

LC: 56, 57, 252, 253, 435, 986

โ†’ Sort by start or end time, then merge, count, or remove overlaps.

[13] Heap and top K

LC: 23, 215, 295, 347, 373, 973

โ†’ Use when you repeatedly need the smallest, largest, or top K elements.

[14] Grid and graph BFS

LC: 127, 200, 286, 542, 752, 994

โ†’ BFS is the default for shortest steps in an unweighted graph.

[15] Backtracking

LC: 39, 46, 78, 79, 90, 131

โ†’ Choose, explore, undo. Use when all valid combinations must be generated.

[16] Tree DFS

LC: 98, 100, 104, 110, 124, 236

โ†’ Decide what information each subtree should return to its parent.

[17] Tree BFS

LC: 102, 103, 199, 515, 637, 662

โ†’ Use when the answer depends on levels, width, or visible nodes.

[18] Trie

LC: 208, 211, 212, 421, 648, 720

โ†’ Use for prefixes, dictionaries, word search, and bitwise prefix matching.

[19] Union find

LC: 200, 261, 305, 547, 684, 721

โ†’ Use for dynamic connectivity, grouping, and cycle detection.

[20] Topological sort

LC: 207, 210, 269, 310, 1136, 1203

โ†’ Look for prerequisites, dependencies, ordering, or build sequences.

[21] Greedy

LC: 45, 55, 134, 435, 621, 763

โ†’ Make the best local choice only when you can justify why it stays safe.

[22] One-dimensional DP

LC: 70, 139, 198, 213, 300, 322

โ†’ Define the state clearly, then connect it to smaller states.

[23] Two-dimensional DP

LC: 62, 63, 64, 72, 221, 1143

โ†’ Use when the state depends on two changing inputs or positions.

[24] Knapsack and subset DP

LC: 416, 474, 494, 518, 879, 1049

โ†’ Look for choosing items under a limit, target, or capacity.

[25] Bit manipulation

LC: 136, 191, 231, 268, 338, 371

โ†’ Learn XOR, masks, shifts, set-bit checks, and subset representation.

Do not solve these as 150 unrelated questions.

For every problem, write down:

โ†’ Which pattern gave it away?

โ†’ What changed from the standard version?

โ†’ What would break the current solution?

โ†’ Can you recognize the pattern within 90 seconds?


r/datastructures • • Oct 07 '26 Regret Bravo

DSA FOR beginner

Post image
242 Upvotes

Is (Raj) striver is a good choice for DSA for a beginner

I am starting my DSA journey with strivers A-Z DSA Course. Is it a good option or there are better courses available in the market.


r/datastructures • • Feb 13 '26

Data Structures in Python Visualized

240 Upvotes

Understanding a data structure like linked list in Python is a lot easier when you can just see it: Linked_List demo

memory_graph visualizes Python objects and references, so data structures stop being abstract and become something you can debug with ease. No more endless print-debugging. No more stepping through 50 frames just to find one sneaky reference/aliasing mistake.


r/datastructures • • 19d ago

I conducted 100 interviews at Meta. The main reason for failure is usually not talking enough.

223 Upvotes

Don't jump into the solution straight away, even if you manage to write the code, it is usually considered as a bad signal. That might sound obvious but I am surprised how many candidates do this. First scope the problem, clearly describe your approach to the interviewer, and think about all the edge cases.

Problem solving skills, communication, the way candidate makes sure the solution works for every case are signals not less important than the working solution itself, you have to show it. Communication also gives the interviewer a change to help you, they are actually encouraged to do it when necessary. Also, how you incorporate that hints is another positive signal.

I am happy to answer any questions about what interviewers look for, how to prep, or anything about the process.


r/datastructures • • Jul 06 '26 Mindblown

How I gamify and enjoy DSA.

Thumbnail
gallery
205 Upvotes

When I'm studying DSA or a certain pattern I like to document and treat the problem as a discovery.

I like to start from documenting the WHAT? then the WHY? And lastly the HOW? Of it. The way I do is this :

  1. I describe the problem in simplest way possible with great detail, this helps me clearly understand what is needed exactly and also if their are some constraints over how we have to solve the problem. This first step alone gives me a lot of clarity on what tools I can use and what I can't .

  2. Once I have understood what's needed to be done. The next step is to think without any optimization in mind , that is I imagine that I have unlimited resource of memory and labour available to solve this particular problem and if so what would be simplest way to go about doing it? This gives me the brute-force approach for it and tbh if you reach the brute-force solution you have already solved it now it's reduced to an optimization problem.

  3. Once I reach a brute-force solution I write it down in a clear and concise manner , this helps me understand my own thoughts and also spot "blindspot in my thinking ".. this is crucial because sometimes you feel that a solution is right but when it's in your head sometimes you miss some scenarios, therefore I write it down.

  4. After the brute force is down , only then do I move forward to think of optimization and it often leads me to video solution ๐Ÿ˜…๐Ÿ™‹๐Ÿ˜‚ and every time I feel fascinated and impressed by the actual solution and optimization which someone came up with in the past. I love it every time . This makes me enjoy each and every problem I do .

Today I was doing MAXIMUM_SUBARRAY_SUM and it's optimization by KADANE'S algorithm. Here is few glimpse of my notes :


r/datastructures • • Jul 09 '26

could have completed graphs earlier......

Post image
188 Upvotes

The 3rd year of Engineering is about to start and i haven't done Graphs and DP yet. I think I'm too late cause I still have to resume my almost untouched Dev . If any of you are good at development , suggest some way to start and guidance or tips would be helpful.....


r/datastructures • • Jul 28 '26

20 YouTube Channels Every DSA Student Should Follow

178 Upvotes

20 YouTube Channels Every DSA Student Should Follow

  1. take U forward (Striver)

- A2Z DSA Roadmap, SDE Sheet & Interview Prep

2. NeetCode

- LeetCode Patterns & FAANG Interview Solutions

3. Kunal Kushwaha

- Java + DSA + Open Source + Career Guidance

4. CodeHelp by Babbar

- Complete DSA, C++, Interview Preparation

5. Apna College

- Java, C++, DSA & Placement Preparation

6. Abdul Bari

- Algorithms, Data Structures & Computer Science

7. Aditya Verma

- Dynamic Programming, Sliding Window & Trees

8. Pepcoding

- DSA, Competitive Programming & Placements

9. CodeWithHarry

- C++, Java, Python & Beginner-Friendly DSA

10. Anuj Bhaiya

- DSA, Placements & Interview Preparation

11. freeCodeCamp .org

- Complete DSA & Programming Courses

12. Nick White

- LeetCode Problem Explanations

13. WilliamFiset

- Advanced Data Structures & Algorithms

14. Jenny's Lectures CS/IT

- DSA, DBMS, OS & Computer Networks

15. Neso Academy

- DSA & Core Computer Science Subjects

16. Back To Back SWE

- Coding Interview Questions & Algorithms

17. Tech Dose

- DSA, Competitive Programming & Placements

18. Gaurav Sen

- System Design & Software Engineering

19. The Cherno

- C++, Memory Management & Low-Level Programming

20. CS Dojo

- Coding Interviews & Problem Solving

Pick one roadmap.

Stay consistent until you finish it.


r/datastructures • • Apr 09 '26

Data Structure Visualized using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต

175 Upvotes

Data Structures in Python get easy when you can simply see the structure of your data using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต. A Hash_Set example.


r/datastructures • • Sep 08 '26

Is this a correct way to learn DSA.

Post image
162 Upvotes

I am going to start my DSA in a few days and i don't have much idea how to approach this , and this is something I came up with like going through this structure and learning DSA as well as sql together like 70% of the time DSA and SQL 30%.


r/datastructures • • 25d ago

I made a DSA + Web Development roadmap for my placement prep. Is this realistic?

Post image
157 Upvotes

Hi everyone,

Iโ€™m a 3rd-year BTech CSE student preparing for placements. Iโ€™ve made this handwritten roadmap to track my DSA and Web Development preparation.

DSA: Recursion โ†’ Sorting โ†’ OOP โ†’ Linked List โ†’ Stack โ†’ Queue โ†’ Trees โ†’ BST โ†’ Maps & Sets โ†’ Heaps โ†’ Greedy โ†’ DP โ†’ Graphs โ†’ Backtracking โ†’ Segment Tree

Web Development: CSS โ†’ JavaScript โ†’ DOM โ†’ React โ†’ Backend

Iโ€™m planning to complete these topics with regular revision and problem-solving rather than just watching lectures.

My target is campus placement around 2027, so I want to know:

1.Is this roadmap realistic?

2.Am I missing any important DSA topics?

3.What should I prioritize for placement coding rounds?

4.Should I focus more on DSA or Web Development at this stage?

Any suggestions from people who have already gone through placement preparation would be really helpful.

Thanks!


r/datastructures • • 17d ago

The most efficient way to prepare for coding interview

Post image
153 Upvotes

I've conducted 100 coding interviews at Meta. Here's how people should prepare to not waste their time:

  • Focus on a small number of problems. You don't need to solve 1k problems to prepare for an interview. More important part is the problems should cover all the data structures and patterns you need, in proportion to how often each one comes up in interviews.

  • Follow the roadmap. The problems set should be ordered by difficulty and what patterns they require. Don't start solving backtracking problem if you didn't learn recursion.

  • Don't group problems by topics. When you know what pattern should be applied in advance, you're not learning how to recognise this pattern in a random problem. On a real interview problem doesn't come with topics revealed.

  • Reinforce what you learn. It's a common mistake to learn a pattern then move on to the next one and forget about it. To really understand the pattern you should repeatedly solve similar problems over time. Ideally when they are grouped with other known patterns.

The problem with those advice is it's hard to do all of it at once. You either solve random leetcode problem or follow some predefined list of problems grouped by a pattern.

That's why I've started to build a free, complete roadmap where all of those points are included. It uses spiral learning technique where a learned topic appears multiple times in future problems with stronger idea.

More info here.

I'd be interested to hear what you think of it and happy to answer any other questions on interview preparation. Thanks!


r/datastructures • • 28d ago

Can i learn DSA from this playlist?

Post image
147 Upvotes

r/datastructures • • Jul 20 '26

DSA Preparation roadmap from zero to hero

137 Upvotes

Sliding Window: 3, 76, 209, 424, 567, 904

Two Pointers: 11, 15, 16, 18, 42, 167

Fast/Slow Pointers: 141, 142, 19, 876, 160, 234

Binary Search (Sorted Data): 33, 34, 35, 153, 162, 704

Binary Search (on Answer): 875, 1011, 410, 774, 1283, 1482

Hashing / Frequency Maps: 1, 49, 128, 217, 242, 347

Prefix Sum / Running Sum: 303, 560, 724, 930, 974, 523

Difference Array / Range Updates: 370, 1094, 1109, 1893, 1943, 2381

Monotonic Stack: 739, 496, 503, 84, 85, 901

Monotonic Queue / Deque: 239, 862, 1425, 1438, 1499, 1696

Heap / Top K: 215, 347, 692, 703, 973, 1046

Intervals: 56, 57, 252, 253, 435, 452

Greedy Scheduling / Sorting: 45, 55, 406, 621, 763, 134

Linked List Manipulation: 21, 23, 24, 25, 92, 138

Tree DFS: 104, 112, 113, 543, 124, 226

Tree BFS / Level Order: 102, 103, 199, 515, 637, 116

BST Problems: 98, 99, 230, 235, 450, 700

Backtracking Basics: 46, 47, 77, 78, 90, 39

Backtracking with Constraints: 40, 17, 79, 131, 51, 52

Graph BFS / DFS: 200, 695, 733, 994, 1091, 1254

Topological Sort / DAG: 207, 210, 802, 1462, 1203, 2115

Union Find / DSU: 547, 684, 1319, 1579, 990, 1202

Shortest Path: 743, 787, 1514, 1631, 1334, 1976

MST / Graph Greedy: 1584, 1135, 1168, 1489, 778, 1102

Trie: 208, 211, 212, 648, 677, 1268

Bit Manipulation: 136, 137, 191, 338, 268, 190

1D DP Basics: 70, 198, 213, 322, 279, 300

Knapsack / Subset DP: 416, 494, 518, 474, 1049, 879

Grid DP: 62, 63, 64, 221, 931, 120

String DP / Sequence DP: 1143, 72, 115, 583, 97, 1312


r/datastructures • • Jan 19 '26

Help me think logic to print this Matrix

Post image
135 Upvotes

I was out of practice for logic building and all for a long time. Recently started again, was looking into some 2-d array problems and this got my attention. This was asked in some good companies like Amazon, Microsoft, etc.
Here we need to print this matrix (a 2-d array) in the direction red line goes. In the image square is given, but it's size can change, like 4x2 or something else..

Please don't give the exact answer, just some hints to help me think (that is the reason I posted this here and not used any help from Google or LLMs)


r/datastructures • • Jul 05 '26 Heartwarming

STRIVER A2Z DSA

Post image
132 Upvotes

What is the BEST WAY TO LEARN FROM THIS PLAYLIST???

like should we make notes for all lectures? Or should we jot down only important points? Or should we just listen and understand?

(Extra tips will be acknowledged :)


r/datastructures • • Aug 10 '26

Data Structures and Algorithms Roadmap for Beginners in 2026

125 Upvotes

Many of us ignore CS fundamentals, but in many tech interviews they will ask CS fundamentals. For me, they asked only CS fundamentals in all 3 interviews at Oracle, So don't ignore CS fundamentals. I have made a list of important topics subject-wise and resources I have used to study at the end.

Object-Oriented Programming (OOPs)

Core Concepts

  • Encapsulation

  • Inheritance (types and use cases)

  • Polymorphism (compile-time vs runtime)

  • Abstraction

  • Abstract Class vs Interface

  • Method Overloading vs Overriding

  • Access Modifiers

  • Static vs Dynamic Binding

  • Deep Copy vs Shallow Copy

Advanced Topics

  • SOLID Principles

  • Diamond Problem (Multiple Inheritance)

  • Association vs Aggregation vs Composition

  • Virtual Functions and Vtable

  • Design Patterns (Singleton, Factory, Observer, Strategy, Decorator, Adapter)

Operating Systems (OS)

Process Management

  • Process vs Thread

  • Process States and PCB

  • Context Switching

  • CPU Scheduling Algorithms (FCFS, SJF, Round Robin, Priority)

  • Multithreading vs Multiprocessing

  • User Mode vs Kernel Mode

Synchronization

  • Critical Section Problem

  • Race Condition

  • Mutex vs Semaphore (Binary vs Counting)

  • Monitors and Locks

  • Producer-Consumer Problem

  • Readers-Writers Problem

  • Dining Philosophers Problem

Deadlocks

  • Deadlock Conditions (4 necessary conditions)

  • Deadlock Prevention vs Avoidance vs Detection

  • Banker's Algorithm

Memory Management

  • Paging vs Segmentation

  • Page Replacement Algorithms (FIFO, LRU, Optimal)

  • Thrashing

  • Virtual Memory

  • TLB (Translation Lookaside Buffer)

  • Internal vs External Fragmentation

File Systems & Disk

  • File Allocation Methods (Contiguous, Linked, Indexed)

  • Disk Scheduling (FCFS, SSTF, SCAN, C-SCAN)

Database Management Systems (DBMS) + SQL

Database Fundamentals

  • ACID Properties (with examples)

  • CAP Theorem

  • Normalization (1NF, 2NF, 3NF, BCNF)

  • Denormalization

  • Primary Key vs Foreign Key vs Candidate Key

  • ER Diagrams

Indexing

  • Types of Indexes (Primary, Secondary, Clustering)

  • B-Tree vs B+ Tree

  • Hash Index

  • Composite Index

  • Advantages and Disadvantages of Indexing

Transactions & Concurrency

  • Transaction Lifecycle

  • Isolation Levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable)

  • Dirty Read, Non-repeatable Read, Phantom Read

  • Lost Update Problem

  • Two-Phase Locking (2PL)

  • Optimistic vs Pessimistic Locking

  • Deadlock in Database

SQL Queries (Must Practice)

  • JOINs (INNER, LEFT, RIGHT, FULL OUTER, CROSS, SELF)

  • GROUP BY and HAVING

  • Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)

  • Subqueries (Correlated vs Non-correlated)

  • Window Functions (ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG)

  • Common Table Expressions (CTE)

  • UNION vs UNION ALL

  • Nth Highest Salary Query

  • Delete Duplicates Query

NoSQL

  • SQL vs NoSQL

  • Types of NoSQL Databases (Document, Key-Value, Column, Graph)

Computer Networks (CN)

Network Models

  • OSI Model (7 Layers)

  • TCP/IP Model (4 Layers)

  • Difference between OSI and TCP/IP

Application Layer

  • HTTP vs HTTPS

  • HTTP Methods (GET, POST, PUT, DELETE, PATCH)

  • HTTP Status Codes (2xx, 3xx, 4xx, 5xx)

  • DNS and its working

  • FTP, SMTP, POP3, IMAP

  • Cookies vs Sessions

  • REST API principles

Transport Layer

  • TCP vs UDP (detailed comparison)

  • TCP Three-Way Handshake

  • TCP Four-Way Termination

  • Flow Control (Sliding Window)

  • Congestion Control

  • Port Numbers (well-known ports)

  • Socket Programming Basics

Network Layer

  • IPv4 vs IPv6

  • Public vs Private IP

  • Subnetting and CIDR

  • NAT (Network Address Translation)

  • ICMP Protocol

  • Routing Algorithms (Distance Vector, Link State)

  • Routing Protocols (RIP, OSPF, BGP)

Data Link Layer

  • MAC Address

  • ARP (Address Resolution Protocol)

  • Switch vs Hub vs Router

  • Ethernet

  • Error Detection (Parity, CRC, Checksum)

Physical Layer

  • Transmission Media (Guided vs Unguided)

  • Bandwidth and Throughput

  • Different Topologies

Important Concepts

  • Client-Server vs Peer-to-Peer Architecture

  • DHCP

  • Firewall

  • VPN

  • Load Balancing

  • CDN (Content Delivery Network)

  • Latency vs Throughput

  • How does a URL work? (End-to-end flow)

  • Some Basic Commands (ex: ipconfig)

Resources I Used

For OOPs

  • Kunal Kushwaha (youtube channel)

For Operating Systems

  • CodeHelp - by Babbar (youtube )

For DBMS + SQL

  • LeetCode Database problems (Practice SQL)

  • CodeHelp - by Babbar (youtube)

  • Apna College (youtube)

For Computer Networks

  • Gate Smashers (youtube)

Questions Asked in My Interviews

Here are some actual questions I was asked across my interviews:

  1. Is Java fully object-oriented?

  2. How does C++ overcome the diamond problem?

  3. Difference between TCP and UDP, and which one is used when?

  4. Explain ACID properties with examples

  5. What is deadlock and how can we prevent deadlocks?

  6. What is the use of indexing in databases?

  7. Explain the functionalities of each layer in the OSI model

  8. Write a query to find Kth smallest salary

  9. IPv4 vs IPv6

  10. Abstraction vs Encapsulation

  11. Explain different joins in dbms

  12. what is sharding ?

  13. what is virtual function in cpp ?

  14. show me your ip address and mac address using commands

  15. what is context switching ?

Tips :

  1. Practice with real interview questions

  2. Reviseย SQL 50ย before interviews

  3. It's better to say "I'm not sure about this, but here's what I think..." than to give wrong information

  4. If your project contains any database related stuff , better learn it's ER diagram, differences between SQl and NO-SQl and why you selected that particular database you used

  5. Before preparing for any interview , First check out PracHub, Ask your seniors or friends who already attended that specific company interviews before and prepare accordingly


r/datastructures • • 15d ago

Prepare for DSA and ML Together โ€” Join My Daily practice group and weekly project sessions

124 Upvotes

I have prepared a daily and weekly concept learning roadmap โ€” one concept at a time, day by day, week by week โ€” to help prepare for DSA and ML/AI together. I am preparing for both - looking for like minded people to join and practice.

Here is how it works:

Learn one concept in DSA. Apply the same concept in ML. And vice versa.

That connection is what gives implementation-level knowledge. Not just theory. Not just solving problems for the sake of solving them. You understand a concept because you have seen it work on both sides.

Take one example โ€” HNSW and RAG.

In RAG, your documents are converted into embeddings โ€” vectors. When a question comes, the system has to find the few chunks that are nearest to that question. That is the ML side.

Now the DSA side. The simple way is to check the question against every single chunk, one by one. It works when the data is small. As the data grows, it becomes slow.

HNSW solves this with a DSA concept โ€” a graph. It connects each vector to its nearest neighbours, layer by layer, so the search walks through the graph and reaches the nearest chunks fast, instead of scanning everything.

And it also works in reverse. When you build a RAG system, you are forced to learn graphs, nearest neighbour search, and a real tradeoff โ€” HNSW is fast, but approximate. Sometimes it can miss a close chunk. So you learn to check: how fast is it, and how correct is it?

One example. And you have touched graphs, search, embeddings, and retrieval โ€” at implementation level, not just in theory.

This is how the whole roadmap works.

Join me for reading group - 30 minutes every day, to practice and discuss the concept of the day together. On weekend I am developing a ML project related to the concept and doing kaggle.

If you are also preparing for DSA and ML/AI and want to learn like this, join my study group.

DM me if you are interested.


r/datastructures • • Jul 21 '26

DSA Pattern Roadmap (From Zero to Placement Ready)

123 Upvotes

DSA Pattern Roadmap (From Zero to Placement Ready)

โ”ฃย  1. Foundations You Cannot Skip

โ”ƒ โ”ฃ Time & Space Complexity

โ”ƒ โ”ฃย  Big-O Notation

โ”ƒ โ”ฃย  Recursion Basics

โ”ƒ โ”ฃย  Basic Math (GCD, Prime, Factorization, Modulo)

โ”ƒ โ”—ย  Problem Solving Basics (Brute Force โ†’ Better Approach)

โ”ฃย  2. Core Data Structures

โ”ƒ โ”ฃย  Arrays

โ”ƒ โ”ฃย  Strings

โ”ƒ โ”ฃย  Linked Lists

โ”ƒ โ”ฃย  Stack

โ”ƒ โ”ฃย  Queue / Deque

โ”ƒ โ”ฃย  HashMap / HashSet

โ”ƒ โ”—ย  Heap / Priority Queue Basics

โ”ฃย  3. First Pattern Layer

โ”ƒ โ”ฃย  Two Pointers

โ”ƒ โ”ฃย  Sliding Window

โ”ƒ โ”ฃย  Prefix Sum

โ”ƒ โ”ฃย  Binary Search on Array

โ”ƒ โ”ฃย  Sorting + Observation

โ”ƒ โ”—ย  Frequency Counting / Hashing Patterns

โ”ฃย  4. Recursion & Search Patterns

โ”ƒ โ”ฃย  Recursion on Arrays / Strings

โ”ƒ โ”ฃย  Backtracking

โ”ƒ โ”ฃย  Subsets / Subsequences

โ”ƒ โ”ฃย  Permutations / Combinations

โ”ƒ โ”ฃย  Decision Tree Thinking

โ”ƒ โ”—ย  Pruning Techniques

โ”ฃย  5. Tree Patterns

โ”ƒ โ”ฃย  Binary Tree Traversals

โ”ƒ โ”ฃย  BST Basics

โ”ƒ โ”ฃย  DFS on Trees

โ”ƒ โ”ฃย  BFS / Level Order

โ”ƒ โ”ฃย  Height / Diameter / Balanced Tree

โ”ƒ โ”ฃย  Path Sum / Tree DP Basics

โ”ƒ โ”—ย  Lowest Common Ancestor

โ”ฃย  6. Graph Patterns

โ”ƒ โ”ฃย  Graph Representation

โ”ƒ โ”ฃย  BFS

โ”ƒ โ”ฃย  DFS

โ”ƒ โ”ฃย  Connected Components

โ”ƒ โ”ฃย  Cycle Detection

โ”ƒ โ”ฃย  Topological Sort

โ”ƒ โ”ฃย  Shortest Path Basics

โ”ƒ โ”—ย  Union Find / Disjoint Set

โ”ฃย  7. Advanced Pattern Layer

โ”ƒ โ”ฃย  Monotonic Stack

โ”ƒ โ”ฃย  Monotonic Queue

โ”ƒ โ”ฃย  Heap / Top K Problems

โ”ƒ โ”ฃย  Trie

โ”ƒ โ”ฃย  Bit Manipulation

โ”ƒ โ”ฃย  Greedy Patterns

โ”ƒ โ”ฃย  Interval Problems

โ”ƒ โ”—ย  Merge / K-way Processing

โ”ฃย  8. Dynamic Programming Roadmap

โ”ƒ โ”ฃย  1D DP

โ”ƒ โ”ฃย  2D DP

โ”ƒ โ”ฃย  Take / Not Take Pattern

โ”ƒ โ”ฃย  Knapsack Variants

โ”ƒ โ”ฃย  LIS Pattern

โ”ƒ โ”ฃย  String DP

โ”ƒ โ”ฃย  Grid DP

โ”ƒ โ”ฃย  DP on Subsequences

โ”ƒ โ”ฃย  DP on Trees

โ”ƒ โ”—ย  State Design Practice

โ”ฃย  9. Advanced Algorithms

โ”ƒ โ”ฃย  Dijkstraโ€™s Algorithm

โ”ƒ โ”ฃย  Floyd Warshall Basics

โ”ƒ โ”ฃย  Minimum Spanning Tree

โ”ƒ โ”ฃย  Kahnโ€™s Algorithm

โ”ƒ โ”ฃย  Shortest Path Variants

โ”ƒ โ”ฃย  Binary Search on Answer

โ”ƒ โ”ฃย  Segment Tree / Fenwick Tree Basics

โ”ƒ โ”—ย  Advanced Graph + DP Mix Problems

โ”ฃย  10. Pattern Recognition Training

โ”ƒ โ”ฃย  How to Identify the Input Type

โ”ƒ โ”ฃย  How to Spot Trigger Words

โ”ƒ โ”ฃย  Map Problem โ†’ Pattern

โ”ƒ โ”ฃย  Brute Force โ†’ Optimized Thinking

โ”ƒ โ”ฃย  Similar Problem Grouping

โ”ƒ โ”ฃย  Pattern Notes / Cheat Sheets

โ”ƒ โ”—ย  Revision by Buckets, Not Random Questions

โ”ƒ

โ”ฃย  11. Practice System

โ”ƒ โ”ฃย  Easy โ†’ Medium โ†’ Hard Progression

โ”ƒ โ”ฃย  LeetCode / NeetCode / Codeforces

โ”ƒ โ”ฃย  Daily Timed Practice

โ”ƒ โ”ฃย  Weekly Mixed Contest Practice

โ”ƒ โ”ฃย  Topic-wise Sheets

โ”ƒ โ”ฃย  Re-solving Old Problems

โ”ƒ โ”—ย  Mistake Log / Weak Area Tracker


r/datastructures • • 4d ago

comeback arc is loading

Post image
116 Upvotes

r/datastructures • • 11d ago

I built a browser extension to customize LeetCode's UI!

Post image
107 Upvotes

Got bored of the default LeetCode look, so I built this!

You can customize LeetCode with different themes and wallpapers.

Link in the comments!

What do you think? Any suggestions?


r/datastructures • • Jul 29 '26

Guys plz help me to start my DSA & Leetcode Journey ๐Ÿฅฒ๐Ÿ™

Post image
107 Upvotes

Hey everyone,

I'm a 3rd year B.Tech CSE student and want to start learning DSA. My programming language is Java.
I'm confused about where to begin. What should I learn first, and what's the proper roadmap after that? When should I start solving LeetCode problems?

Can anyone share a beginner-friendly DSA roadmap for Java that can help with placements and internships?

Thanks!