r/datastructures 11h ago

DSA Important Topics

28 Upvotes

If you master only these topics...

you'll be prepared for almost every Big Tech interview.

★★★★★ Arrays

★★★★★ Trees

★★★★★ Graphs

★★★★★ DP

★★★★★ Binary Search

★★★★☆ Hashing

★★★★☆ Linked Lists

★★★★☆ Heaps

★★★★☆ Sliding Window

★★★★☆ Greedy

Companies change.

Patterns don't.


r/datastructures 8h ago

Two different Binary Tree implementations side by side

Enable HLS to view with audio, or disable this notification

9 Upvotes

The same tree represented in two very different ways visualized using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵: Binary Trees

🔗 Binary Tree as Nodes: The tree is built out of multiple node objects. Each node stores its value and two references, one to its left child and one to its right child.

📦 Binary Tree as List: The tree is stored in a single list or array. Instead of references, indices represent the relationships between nodes. For a node at index, its children can be found using a simple calculation: - Left child: 2 * index + 1 - Right child: 2 * index + 2

So, when should you use which representation?

The node-based version makes the structure explicit and intuitive. It is great for education: students can clearly see how nodes are connected while practicing classes and references/pointers. It is flexible and works particularly well for irregular or sparse trees. It is the clearest representation when learning how trees work.

The list-based version can be very efficient for (nearly) balanced trees. It does not need to store child references, requires fewer separate memory allocations, and keeps values close together in memory for improved cache performance.

The same abstract data structure, but with very different trade-offs in clarity, flexibility, and performance.

Which representation would you use?


r/datastructures 55m ago

How would you restart DSA after taking a long break?

Upvotes

Hey everyone,

I could really use some advice from people who've been in a similar situation.

A few months ago, I was consistently practicing DSA and had covered the basics. I was comfortable with patterns like Two Pointers and could usually recognize when to use them.

Then life got in the way, and I took a long break.

Now I need to prepare for NIMCET, which is my top priority, while also getting back into DSA for future internships. Because of that, I can't spend 5–6 hours a day on LeetCode.

My question is:

  • If you had to restart DSA after a long break, how would you do it?
  • Would you restart from Easy problems, or jump straight back into pattern-based practice?
  • Is solving 2–3 quality problems a day enough if I'm also studying for another competitive exam?
  • How would you balance DSA with another major exam without burning out?

Right now, I'm thinking of revising one pattern at a time (Sliding Window → Hash Maps → Binary Search → Trees...) instead of randomly solving problems, but I'd love to hear what worked for you.

Thanks!


r/datastructures 18h ago

Is Strivers A2Z DSA course enough for DSA ?

4 Upvotes

Please guys I've been searching for something good to start dsa.


r/datastructures 15h ago

JAVA DSA and full stack buddies

2 Upvotes

Hello everyone, I started learning Java Full Stack about 6 months ago, but somehow I couldn't complete it. Now that I have started again, I realize that I have forgotten most of the concepts. This time, I have started from scratch and am currently learning OOP concepts. I hope I will be able to complete it successfully this time.

If you're in the same boat, we can connect and help each other stay consistent and learn together.

I also know the MERN stack, through which I completed an internship and some freelance work. Alongside that, I am practicing DSA as well.


r/datastructures 1d ago

DSA Pattern Roadmap (From Zero to Placement Ready)

104 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 1d ago

Need a DSA Accountability Partner – Let's Crack Product Companies Together!

20 Upvotes

Hey everyone!

I'm looking for a dedicated DSA partner to stay consistent and improve together.

About me:

  • Beginner to intermediate in DSA
  • Solving problems in Java/Python
  • Targeting product-based companies
  • Available 1–2 hours daily
  • Time Zone: IST (India)

What I'm looking for:

  • Someone who's serious about being consistent
  • Daily problem solving (2–5 questions)
  • Discuss approaches instead of just sharing solutions
  • Keep each other accountable and motivated

If you're interested, drop a comment or DM me with:

  • Your current DSA level
  • Preferred language (Java/C++/Python)
  • Your goal (internships, placements, job switch, etc.)

Let's crack DSA together! 💪


r/datastructures 1d ago

2nd year CS student and I still haven't started coding. Every time I try learning a language, I get completely lost and end up quitting. How do I actually start and stay consistent?

13 Upvotes

So, i need help from you guys as i really wanna start learning and be consistent in it and master atleast by the end of my 2nd year so that i could be confident for my placements in 3rd year :)


r/datastructures 22h ago

Anyone’s up for dsa?

2 Upvotes

Let me know if anyone’s interested. Work professional only please. Also, I will be solving problems in java. Just need some people so that we can hold each other accountability. Please dm only serious peeps😊


r/datastructures 1d ago

Looking for a DSA practice partner.

13 Upvotes

I am a backend engineer in a small company. Been here for 2 years and now I want to switch. I am restarting my DSA. Would like a buddy along.😁


r/datastructures 1d ago

[Mentorship] Master core DSA with an incoming FAANG SDE (Live Google Meet / 8–10 students max)

77 Upvotes

Hey everyone,

​I’m a recent IIT graduate (Data Science & Engineering) and will be joining a FAANG company as a Software Development Engineer (SDE) very soon.

​Over the last few years, I’ve spent a ton of time cracking data structures and algorithms, systems development, and competitive programming mechanics. Now that I have a bit of a breather before my full-time role starts, I want to give back and help a few people genuinely master the trickier parts of DSA.

​I’m looking to put together a small, focused group (8–10 people max) to live-stream and deep-dive into 2–3 major topics—like Binary Search, Graphs, Trees, or whatever the group collectively wants to master.

​Here is the plan:

​Format: Interactive, live sessions via Google Meet (I want to keep it highly conversational, not a boring lecture).

​Cost: Just a very minimal fee to ensure everyone stays committed and shows up.

​Prerequisite: You just need basic coding skills in any language (Java, C++, Python, etc.). We will handle the logic and algorithmic thinking together from there.

​Whether you are preparing for placements, trying to break out of a coding plateau, or just want to build a rock-solid foundation, this is for you.

​If you're interested in joining the group, drop a comment below or send me a DM with a quick intro about your current coding level and what topics trip you up the most. Looking forward to crushing these topics together!


r/datastructures 1d ago

Looking for a serious placement study buddy (Final Year | DSA + JS + CS Subjects)

5 Upvotes

Hey everyone!

I'm a final-year B.Tech student preparing for placements and I'm looking for a serious study buddy who's consistent and genuinely motivated.

A little about me:

  • Solved 250+ DSA questions on LeetCode and GFG.
  • Currently learning JavaScript and studying Computer Networks.
  • My goal is to finish both by the end of this week before moving on to the next topics.

I'm looking for someone who wants to:

  • Study consistently together (even if it's just virtual accountability).
  • Discuss what we learned at the end of the day.
  • Take mock interviews once in a while.
  • Push each other to stay on track.

I'm from a Tier 3 college, and unfortunately the coding culture here isn't great. If you're from a Tier 1 or Tier 2 college, it would be amazing to connect—I think it would help me understand where I stand and learn from your approach. That said, anyone who's serious and committed is more than welcome.

My study timings are:

  • Morning: 5:00 AM – 10:00 AM (IST)
  • Evening: 7:00 PM – 9:00 PM (IST)

If you're interested, drop a comment or DM me with:

  • Your year/college (optional)
  • Current preparation level
  • Topics you're working on
  • Your goals for the next few weeks

Let's help each other stay consistent and crack placements together. 🚀


r/datastructures 1d ago

How to determine if the Leetcode question is able to solved in o(n) time complexity ?

13 Upvotes

I had started to do DSA recently, while I was doing a Leetcode question I was thinking about the approach to solve that question in the time complexity of O(n) after thinking about the solution for 2-3hours I was frustrated and Looked at the solution on YouTube where I got to know that the least achievable time complexity of that question is o(nlogn) 😭 and the solution was too simple after sorting the list/array. As a beginner in DSA what suggestions you DSA pros have for me ?


r/datastructures 1d ago

Looking for handwritten notes for Striver's A2Z DSA Sheet

10 Upvotes

Hi everyone,

I'm currently following Striver's A2Z DSA Sheet in C++. I understand the concepts better when I revise from handwritten notes, but I'm a bit too slow at making detailed notes myself.

Does anyone have good handwritten notes (PDF or scanned notebook) that cover the A2Z sheet or at least the major topics like Arrays, Sorting, Binary Search, Linked Lists, Trees, Graphs, and DP?

I'm looking for notes that explain the intuition, important points, time complexity, and common tricks, not just code.

GitHub repos, Google Drive links, or personal notes would all be appreciated.

Thanks!


r/datastructures 1d ago

I am beginners in DSA striver sheet

2 Upvotes

Help me how to learn patterns from any questions


r/datastructures 1d ago

Pattern DSA

1 Upvotes

How to recognise a pattern while doing question


r/datastructures 1d ago

Advice

3 Upvotes

Hey i am going to do btech but in the college I am taking admission it have

1.Cse

2.Cse(software engineering)

3.Cse(ai and ml)

4.Cse(data science)

5.IT

So I have to choose between this so what should be my priority order

Also have another doubt as college have not started I have one month so I am thinking to learn something as I have seen I have made plan of learning c++ and then switching to striver dsa playlist

Along with learning what college teaches in first year

So do this plan is right and also do I need to learn c++ or should I directly watch striver dsa playlist

What are some suggestions


r/datastructures 1d ago

patterns vs topics

1 Upvotes

hey im doing dsa from striver. should i make my notes (not detailed but for revision) topic wise or pattern wise?


r/datastructures 2d ago

Looking for a DSA Accountability Buddy (Java / Striver’s Playlist) – Starting this August!

29 Upvotes

Hey everyone,

​I’m planning to dive deep into Data Structures and Algorithms (DSA) starting this August, and I'll be using Java along with Striver’s A2Z DSA Playlist. I am currently in my first year(just joined).

​I know consistency can be a challenge, so I’m looking for an accountability partner (or a small group) to stay on track.

​About Me & The Plan:

• ​Language: Java

• ​Resource: Striver's A2Z Playlist

• ​Timeline: Starting August 2026

• ​Commitment: will try to solve 2 problens daily, and gradually increase it.

• ​Timezone: India Standard Time(IST)

Time zone in India (GMT+5:30)

​What I’m looking for in a buddy:

Someone who is also starting out or at a similar beginner/intermediate level, planning to stay consistent, and down to do daily or weekly check-ins via Discord to share progress and discuss blockers.

​Comment below or shoot me a DM if you're interested in crushing DSA together!


r/datastructures 2d ago

DSA Preparation roadmap from zero to hero

102 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 2d ago

Want best playlist for DSA

7 Upvotes

Hy currently in 2 nd year ,, 3rd semester started just 1 week ago, bhai Koi youtube peh koi aacha sa detailed me hai DSA playlist jisse mera conceptual and sab kuch questions ke solve ke liye aacha ho plz koi aacha sa suggest kr do


r/datastructures 2d ago

Which DSA course/YouTube playlist should I start with for placements if I'm coding in Python?

5 Upvotes

Hey everyone!

I'm a CSE (AI) student and I'm about to start learning Data Structures & Algorithms seriously for placements and coding interviews.

I'm also starting coding in Python, so I'd prefer resources that use Python instead of C++ or Java.

The problem is that there are way too many recommendations—Striver, NeetCode, Abdul Bari, Kunal Kushwaha, CodeHelp, takeUforward, MIT OCW, Coursera, etc.—and I'm honestly overwhelmed.

I'm looking for a resource that:

  • Starts from absolute basics and builds up properly.
  • Focuses on DSA for coding interviews and placements.
  • Uses Python (or is easy to follow in Python).
  • Includes enough practice so I can eventually solve LeetCode problems confidently.

If you've been through placements or interviews, which course or YouTube playlist would you recommend and why?

Also, if you had to start from scratch again, what roadmap would you follow?

Thanks in advance!


r/datastructures 2d ago

Looking for a DSA buddy to go through Skiena's book in C programming language, but you can pick another language tbh

3 Upvotes

The plan is to talk for a few minutes before starting a study session, deciding on which chapter and exercises we're gonna do on that day. Then we go at it, staying on call in case one of us needs help with something.

When we're done, we take a few extra minutes to teach each other what we have learned.

I'm open for changes in this structure if you think there's a better way to do it. Hit me up if you're interested!


r/datastructures 2d ago

Want best playlist for DSA

2 Upvotes

Hyyy currently in 2 year 3rd semester started just a week ago,,, plz yaar Koi Aachi si playlist suggest kr do Jo aache se explained kr do


r/datastructures 3d ago

How to reach knight and be good at problem solving?

Post image
327 Upvotes

well guy's this is my leetcode profile and i am also solving question on codeforces and total i have solved arounf 1k question from various platforms but still i feel i lack somewhere bcs even after solving 1k que still not able to reach knight on leetcode and some are with 300 question and crossing 1900 rating on leetcode.. give me some tips or resources or whatever which can genuinely help me to be good at problem solving ..
thank you in advance and expecting a replies from you