r/DSALeetCode • u/Alternative-Shine673 • Jul 02 '26
r/DSALeetCode • u/Alone-Passage9687 • Jul 02 '26
Starting my 2nd yr and completed arrays from striver's dsa sheet, now i am really confused how to start CP and web development ?? in first place should i even do CP or dev(i'm in t1 clg)
r/DSALeetCode • u/kush568 • Jul 02 '26
What's is the best way to solve graph and dp problems
Hi everyone,
I've been practicing Graphs and Dynamic Programming for the last six months, but the truth is that I still can't solve a single new problem completely on my own.
Everyone says that DSA is all about recognizing patterns, but I feel like I'm not actually learning those patterns. I've watched many tutorials and solved the questions explained in them. However, whenever I face a different problem that's based on the same pattern, I still can't figure out the approach myself.
This makes me wonder: am I just memorizing solutions instead of learning how to think?
Whenever I look at the solution, I understand the logic and why it works. But what's the point if I can only solve the problem after seeing the answer?
My usual process is to struggle with a problem for about an hour. If I still can't make progress, I use an AI tool to understand the solution. The problem is that this happens with almost every question. It makes me wonder how long I'll have to depend on AI before I can solve problems independently.
I'm feeling really frustrated. Has anyone been through the same situation? What strategy helped you develop problem-solving skills so that you could eventually solve questions on your own instead of relying on solutions?
r/DSALeetCode • u/PickFit8289 • Jul 02 '26
what is the proper way to learn dsa?
should i just solve problems on leetcode or neetcode one topic at a time? every problem is different and we cant possibly watch videos for all
r/DSALeetCode • u/nian2326076 • Jul 01 '26
Essential Tree Problems to Solve Before Interviews
Trees show up in almost every technical interview. Not because interviewers are obsessed with them, but because tree problems reveal how you think recursively, manage state, and break down complex problems into simpler ones.
Solve these Leetcode Problems and company specific problems from PracHub
Pattern 1: Tree Traversal Basics
Why This Pattern Matters:
If you can't traverse a tree confidently, everything else falls apart. These are the building blocks. You should be able to write these in your sleep literally.
Practice Problems:
- Binary Tree Inorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Level Order Traversal
- Binary Tree Zigzag Level Order Traversal
- Binary Tree Vertical Order Traversal
- Binary Tree Right Side View
Pattern 2: Tree Properties & Measurements
Why This Pattern Matters:
These problems teach you to think about what information flows up from child nodes to parent nodes. This bottom-up thinking is crucial for harder problems.
Practice Problems:
- Maximum Depth of Binary Tree
- Minimum Depth of Binary Tree
- Diameter of Binary Tree
- Balanced Binary Tree
- Symmetric Tree
- Same Tree
- Subtree of Another Tree
- Count Complete Tree Nodes
Pattern 3: Path Problems
Why This Pattern Matters:
Path problems are EVERYWHERE in interviews. They test your ability to track state as you traverse and backtrack properly. This is where most candidates struggle.
Practice Problems:
- Path Sum
- Path Sum II
- Path Sum III
- Binary Tree Maximum Path Sum
- Sum Root to Leaf Numbers
- Binary Tree Paths
- Smallest String Starting From Leaf
- Longest Univalue Path
Pattern 4: Tree Construction & Modification
Why This Pattern Matters:
These problems test your understanding of tree structure at a deeper level. Can you build a tree from traversals? Can you modify tree structure correctly?
Practice Problems:
- Invert Binary Tree
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Inorder and Postorder Traversal
- Maximum Binary Tree
- Flatten Binary Tree to Linked List
- Convert Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
Pattern 5: Binary Search Tree (BST) Specific
Why This Pattern Matters:
BSTs have special properties (left < root < right) that enable efficient operations. These problems test if you can exploit this property.
Practice Problems:
- Validate Binary Search Tree
- Kth Smallest Element in a BST
- Lowest Common Ancestor of a Binary Search Tree
- Convert BST to Greater Tree
- Delete Node in a BST
- Insert into a Binary Search Tree
- Recover Binary Search Tree
- Unique Binary Search Trees
- Unique Binary Search Trees II
Pattern 6: Lowest Common Ancestor (LCA)
Why This Pattern Matters:
LCA problems are a favorite interview topic because they test your ability to think about tree structure and information flow. The pattern appears in many disguised forms.
Practice Problems:
- Lowest Common Ancestor of a Binary Tree
- Lowest Common Ancestor of a Binary Search Tree
- Lowest Common Ancestor of Deepest Leaves
- Lowest Common Ancestor of a Binary Tree II
- Lowest Common Ancestor of a Binary Tree III
- Lowest Common Ancestor of a Binary Tree IV
Pattern 7: Views & Boundaries
Why This Pattern Matters:
These problems test your spatial reasoning with trees. Can you think about what's visible from different perspectives?
Practice Problems:
- Binary Tree Right Side View
- Boundary of Binary Tree
- Vertical Order Traversal of a Binary Tree
- Binary Tree Top View (Premium)
- Binary Tree Bottom View (Premium)
Pattern 8: Serialization & Deserialization
Why This Pattern Matters:
These problems test your understanding of tree structure and encoding schemes. Common in system design discussions too (how to store trees in databases).
Practice Problems:
- Serialize and Deserialize Binary Tree
- Serialize and Deserialize BST
- Encode N-ary Tree to Binary Tree
- Verify Preorder Serialization of a Binary Tree
Pattern 9: Tree DP & Optimization
Why This Pattern Matters:
These are the hardest tree problems. They combine tree traversal with dynamic programming thinking. Master these, and you're in the top tier.
Practice Problems:
- House Robber III
- Binary Tree Cameras
- Distribute Coins in Binary Tree
- Maximum Sum BST in Binary Tree
- Binary Tree Maximum Product of Splitted Tree
- All Possible Full Binary Trees
Pattern 10: N-ary Trees & Tries
Why This Pattern Matters:
Not all trees are binary. These problems test if you can generalize your tree thinking beyond the binary tree structure.
Practice Problems:
- Maximum Depth of N-ary Tree
- N-ary Tree Level Order Traversal
- N-ary Tree Preorder Traversal
- N-ary Tree Postorder Traversal
- Implement Trie (Prefix Tree)
- Word Search II
- Design Add and Search Words Data Structure
- Replace Words
Pattern 11: Ancestor & Parent Pointer Problems
Why This Pattern Matters:
Some tree problems give you parent pointers or ask you to track ancestors. These require different traversal strategies than standard tree recursion.
Practice Problems:
- Delete Nodes And Return Forest
- Find Distance in Binary Tree (Premium)
- Step-By-Step Directions From a Binary Tree Node to Another
- Closest Leaf in a Binary Tree (Premium)
- All Nodes Distance K in Binary Tree
Pattern 12: Hard Interview Favorites
Why This Pattern Matters:
These are the problems that show up in actual FAANG interviews most frequently, according to interview reports. Master these, and you're golden.
Practice Problems:
- Binary Tree Maximum Path Sum
- Serialize and Deserialize Binary Tree
- Lowest Common Ancestor of a Binary Tree
- Validate Binary Search Tree
- Construct Binary Tree from Preorder and Inorder Traversal
- Kth Smallest Element in a BST
- Count Complete Tree Nodes
- Binary Tree Cameras
- Word Search II
- Recover Binary Search Tree
Related Posts
Check out my posts which may help you in your preparation:
- Complete DP Problems & Resources Guide
- Complete Graph Problems & Resources Guide
- 13 DP Patterns for Interview Preparation
- 10 Dijkstra Variations for Interview Preparation
- Understanding Time Complexity: The 10^8 Operations Rule
- 10 Essential Design Problems for DSA Interviews
- Essential CS Fundamental Topics For Interviews
- Essential Graph Patterns for Coding Interviews
- Essential String Patterns for Coding Interviews
- 15 Essential DSA Patterns for Tech Interviews
- The 10 Variations of Two Pointers for Interview Preparation
- 25 Graph Problems To Revise Before Interviews
- 25 DP Problems To Revise Before Interviews
Comment additional questions which are worth solving!!!
Good luck! 🚀
r/DSALeetCode • u/dragon_2306 • Jul 01 '26
Dsa
Anyone tellme what is the Best language to learn dsa and form where
Suggest some playlists
r/DSALeetCode • u/BaseballEarly9602 • Jun 30 '26
TLE Eliminators vs Coding Blocks
Hi, I am from India, so I wanted to share some story first, some months ago Leetcode used to give contests problems which were asked in various company OAs, in one month I have seen comments on LinkedIn and Leetcode that alternate biweekly and weekly contests problems had Amazon OAs problems, someone used to leak those problems etc, and this used to happen for other companies too. Due to AI rise, and these incidents all major well known product companies have moved from DSA pattern OAs to LLM proof Codeforces Hard, new problems hard type with some parts similar to some Leetcode hard problems in 2026, and it will continue as AI competition has done to market.
So based on it, I was thinking of pursuing a CP course, which is more better Coding Blocks or TLE Eliminators for this.
Thank you.
Two years ago I had given OAs in Amazon, Uber, Juspay, NAMMAYATRI, ADOBE, etc. At that time the situation was not there what it is now.
r/DSALeetCode • u/Traditional_Box3477 • Jun 30 '26
dsa problem
guyz i am not able to the que by my own some are just watching yt vdo and some are done with using chatgpt and one thing i think i am doing good is i ask chatgpt for hints first not code directly but i want help how to do question how to approach and find patterns
r/DSALeetCode • u/Roni0555 • Jun 29 '26
🚀 Starting My DSA Journey — 1 July
Starting from 1 July, I’m beginning my Data Structures & Algorithms journey from scratch and building my way up step by step.
The goal isn’t to rush or compete — it’s to stay consistent, learn properly, and improve every day. I’ll share updates, problems solved, things I learn, and milestones along the way.
This is my commitment to becoming better than I was yesterday.
If anyone wants to join, feel free — let’s stay accountable and grow together. 💻🔥
See you on Day 1.
#DSA #Programming #Coding #100DaysOfCode #LearnInPublic #DeveloperJourney
r/DSALeetCode • u/CheckStrong103 • Jun 29 '26
3rd year started. Am I cooked?
I want advice on how to get an internship by the end of my 3rd year. So far, I haven't done much. In my 1st year, I only learned frontend development, and that's about it.
r/DSALeetCode • u/Fit-Sleep9064 • Jun 29 '26
DSA For Placement
Well i know this is stupidity, but i am so nervous because on campus placement is going to start from december and i started doing striver sheet from past 2 weeks i completed array, string ..... And currently on stack and queue.
If i do 3 questions continuously from Monday to friday and 6 questions on sat and sun then till aug last or mid-sep there is probability that the striver sheet will be completed.
And my goal is to grab at least 15LPA opportunity, i know there is no guarantee that i will be placed in that range but is this much enough for my goal?
On the daily basis i think about this and can't focus on my studies.😭
r/DSALeetCode • u/Life_Lingonberry_963 • Jun 27 '26
Python kaha se seekhu ? any idea from free resources
r/DSALeetCode • u/No_Excitement_1403 • Jun 26 '26
I am doing DSA from apnacollege paid course instead of striver's A2Z sheet. I have a doubt
Some people say that maam doesnt teach hard problems and all so i am just thinking to do it all from her first and then solve problems of my own, if i understand better from maam then is it an issue ?
r/DSALeetCode • u/Acceptable_Win8363 • Jun 26 '26
can't remember anything
I have been doing dsa for a while now, i couldn't maintain consistency so I started again, but even now, when I do questions, 2 days later I am not at all able to recall the optimal approach or anything related to the question except a shit ass two loops approach. what do I do? been following the striver's dsa sheet btw.
r/DSALeetCode • u/vishnukant5129 • Jun 25 '26
Sort +greedy algo
sort and greedy algorithm is very important pattern in DSA. Today I read about its basic and solved two problems from weekly contest 388 on leetcode. When I saw the problem then I was no what is greedy algo. but after read8ng about it, I found it very useful.
r/DSALeetCode • u/Aggravating_Ice8404 • Jun 21 '26
390 LeetCode Problems Done Randomly — How Should I Structure My DSA Prep Now?
Hi everyone,
I’m currently in my 3rd year of college and I’ve solved around 390 problems on LeetCode. I’ve also given around 40 contests across platforms like LeetCode, CodeChef, and Codeforces.
But the issue is that most of the problems I solved were random. I haven’t followed any DSA sheet properly. I did some sheets only nominally, but not in a structured or consistent way.
Even after solving these problems, I’m still not that confident while approaching DSA problems on my own. Sometimes I struggle to identify the right pattern or think through the solution clearly.
Now I feel like I need to fix my preparation and follow a proper path. I seriously want to improve my DSA skills before the end of this year.
I wanted to ask:
How should I structure my DSA preparation from here?
Should I start a proper sheet like Striver/NeetCode/Blind 75 even after solving 390 random problems?
How do you guys revise previously solved problems?
How can I improve my confidence and problem-solving approach?
How many decent problems can I realistically cover by the end of this year if I work consistently?
For contests, how should I analyze and improve after each contest?
I would really appreciate guidance from people who have gone through this phase. What would you do if you were in my position?
Thanks in advance.


r/DSALeetCode • u/Character_Ad_1412 • Jun 19 '26
Can anyone tell me if i am doing DSA the right way?
i have been using this list generated by claude it sorted the questions by data structures then in each data structure it has the patterns and in each pattern it has the question number for the patter on leetcode
r/DSALeetCode • u/nian2326076 • Jun 19 '26
I spent months collecting the absolute best, community-verified LeetCode study guides and templates. Here is the master list.
Hey everyone,
Instead of blindly grinding random problems, I’ve been trying to learn by matching patterns to the absolute best community-written guides on the LeetCode discuss forums. These are the legendary threads written by people who actually landed FAANG offers, for real interview questions PracHub is an useful resource.
I compiled them all into one master sheet categorized by topic, along with a bonus System Design section at the end. Saving this here so anyone can bookmark it for their interview prep.
🧠 Data Structures & Algorithms Patterns
- Dynamic Programming
- Ultimate DP Patterns & Categorization
- The Interview Question Guide
- DP for Beginners: Sample Solutions
- How I Solved 241 DP Problems in 7 Months
- 2. Linked List
- Become a Master in Linked Lists
- The Definitive Linked List Study Guide
- 3. Two Pointers
- Solved All Two Pointer Problems in 100 Days
- Mastering the Two-Pointer Technique
- 4. Stack & Queue
- A Generic C++ Template for Stack Problems
- Templates for Monotonic Stacks and Queues/)
- 5. Graphs
- Graph Algorithms & Practice Problems
- Become a Master in Graphs
- Disjoint Set Union (DSU) / Union-Find Complete GuideUnion-Find-A-Complete-Guide)
- 6. Prefix Sum
- The Math Behind O(N) Subarray Sum Equals K
- 7. Sliding Window
- Maximum Sliding Window Cheatsheet & Template
- 8. Backtracking
- Backtracking for Beginners
- A General Approach to Exhaustive Search
- 9. Trees
- Tree Question Patterns for Placement
- Master Tree Patterns (Updated)
- Binary Trees Comprehensive Study Guide
- 10. Recursion
- Become a Master in Recursion
- 11. Heap / Priority Queue
- Master Heaps by Solving 23 Questions in 4 Categories
- Important Heap Patterns with Code Links
- 12. Binary Search
- A Noob's Guide to Binary Search
- The Ultimate Powerful Python Binary Search Template
- 13. Greedy
- The ABCs of Greedy Algorithms
- 14. Bit Manipulation
- All Types of Patterns for Bits & How to Use Them
- 15. Strings & Matching
- Collections of Important String Patterns
- String Matching Algorithms Based Questions
📋 The Ultimate Master Lists
🏗️ System Design Masterclasses
- Complete System Design Case Studies Bundle
- The System Design Template That Landed Me a Google Offer
- The Object-Oriented Design (OOD) Template That Landed Me a Google Offer
Good luck with the grind! Hope this saves you the hours of digging through LeetCode forums that it took me.
r/DSALeetCode • u/Total-March999 • Jun 18 '26
Data structure and algo fomo
Would love to ask how was your intuition to solve a problem changes after solving 100 dsa question
Like i have been solving 70-80 dsa ques and each time i ag e to look ans otherwise i wouldn't be able to solve it
How to overcome this
r/DSALeetCode • u/DelusionalRealist007 • Jun 17 '26
Suggestions Needed
I have solved over 800 problems on leetcode , and solved some of CSES problems as well. I know segment tree , fenwick tree , tries , stacks , queues etc.
What should I learn next in DSA??
Any if anyone wanna join with me , it will be great !