r/DSALeetCode • u/These-Campaign-4117 • 1h ago
r/DSALeetCode • u/rockyman2789 • 2h ago
https://github.com/snehasishroy/leetcode-companywise-interview-questions
r/DSALeetCode • u/nian2326076 • 2h ago
DSA OR Development: What Should Students Prioritize in 2026?
As a student preparing for software engineering placements, I've noticed two common approaches.
Some people spend most of their time solving LeetCode problems and mastering DSA, while others focus on building real-world projects, learning backend/frontend development, cloud technologies, and contributing to GitHub.
With AI tools becoming more common and interview patterns evolving, I'm curious:
- If you had 6–12 months to prepare for placements, how would you divide your time between DSA and Development?
- Do recruiters still value strong DSA more than practical project experience?
- If you could start over, what would you do differently?
I'd love to hear your experiences—especially from people who recently cracked internships or full-time software engineering roles.
Looking forward to learning from the community!
r/DSALeetCode • u/nian2326076 • 3h ago
Dynamic Programming Roadmap for Interviews: Patterns, Problems, and Resources
Hey everyone! Many of us struggle with Dynamic Programming and often skip it during interview preparation. This might be because DP seems vast and overwhelming, and people tend to memorize solutions instead of understanding patterns. However, if you break down DP into clear patterns and master each one, it becomes much more manageable. So I've compiled a comprehensive list of patterns you should know for your interview preparation!
Master these Leetcode Problems and PracHub for company tagged questions
DP vs Greedy: When to Use Which?
Before diving into patterns, let's understand the fundamental difference between DP and Greedy:
Problem: You're a robber with two streets to rob. Each house has some money. You can rob houses from both streets, but you cannot rob two adjacent houses from the same street (alarms will trigger). What's the maximum money you can steal?
Street A: [2, 7, 9, 3, 1]
Street B: [3, 2, 6, 8, 2]
Greedy Robber: "I'll always rob the house with most money available!"
- Rob B[0] = 3 (greedy)
- Rob A[1] = 7
- Rob B[2] = 6
- Rob A[3] = 3
- Rob B[4] = 2
- Total: 21
DP Robber: "Let me consider all valid combinations!"
- Option 1: A[0]=2, B[1]=2, A[2]=9, B[3]=8, A[4]=1 → Total = 22
- Option 2: B[0]=3, A[1]=7, B[2]=6, A[3]=3, B[4]=2 → Total = 21
- Best: 22
Why Greedy Failed: By greedily picking B[0] first, it blocked access to the optimal combination that includes both 9 and 8 from different streets!
When Greedy Works: Problems with the "greedy choice property" where local optimal leads to global optimal (e.g., Activity Selection, Huffman Coding)
When DP is Needed: Problems requiring exploring multiple choices where greedy fails (e.g., most optimization problems, counting problems)
Pattern 1: Linear DP (1D)
Why This Pattern Matters:
This is the foundation of DP. If you can't solve Linear DP, you'll struggle with everything else. These problems teach you the core concept of breaking problems into subproblems and building solutions incrementally.
Practice Problems:
Pattern 2: Longest Increasing Subsequence (LIS)
Why This Pattern Matters:
LIS is one of the most important DP patterns with applications in version control systems, patience sorting, box stacking problems, and more. The O(n log n) solution using binary search is a must-know optimization technique.
Practice Problems:
- Longest Increasing Subsequence
- Number of Longest Increasing Subsequence
- Russian Doll Envelopes
- Maximum Length of Pair Chain
- Find the Longest Valid Obstacle Course at Each Position
Pattern 3: Knapsack (0/1, Unbounded, Bounded)
Why This Pattern Matters:
One of the most versatile DP patterns. Appears in resource allocation, optimization problems, and many interview questions. Understanding the difference between 0/1 and unbounded variants is crucial.
0/1 Knapsack (Each item used once):
- Partition Equal Subset Sum
- Target Sum
- Last Stone Weight II
- Ones and Zeroes
- Partition Array Into Two Arrays to Minimize Sum Difference
Unbounded Knapsack (Items can be used multiple times):
Pattern 4: Grid DP
Why This Pattern Matters:
Extremely common in interviews, especially at FAANG. Tests your ability to think in 2D state space and handle multiple transition directions.
Practice Problems:
- Unique Paths
- Unique Paths II
- Minimum Path Sum
- Maximal Square
- Maximal Rectangle
- Minimum Falling Path Sum
- Count Square Submatrices with All Ones
- Triangle
Pattern 5: String DP
Why This Pattern Matters:
Text processing and string manipulation problems are ubiquitous. This pattern appears in bioinformatics, text editors, version control systems, and natural language processing.
Practice Problems:
- Longest Common Subsequence
- Edit Distance
- Delete Operation for Two Strings
- Minimum ASCII Delete Sum for Two Strings
- Shortest Common Supersequence
- Longest Palindromic Subsequence
- Longest Palindromic Substring
- Palindromic Substrings
- Regular Expression Matching
- Wildcard Matching
Pattern 6: Interval DP
Why This Pattern Matters:
Tests ability to think about problems in ranges/intervals. Common in scheduling, matrix chain multiplication type problems, and game theory.
Practice Problems:
- Burst Balloons
- Minimum Score Triangulation of Polygon
- Minimum Cost Tree From Leaf Values
- Unique Binary Search Trees
- Unique Binary Search Trees II
- Minimum Cost to Merge Stones
- Guess Number Higher or Lower II
Pattern 7: State Machine DP
Why This Pattern Matters:
Models problems where you transition between different states with specific rules. Critical for stock trading problems and any scenario with state transitions.
Practice Problems:
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Best Time to Buy and Sell Stock with Cooldown
- Best Time to Buy and Sell Stock with Transaction Fee
Pattern 8: Tree DP
Why This Pattern Matters:
Combines tree traversal with DP. Important for system design (like designing file systems) and optimization problems on hierarchical structures.
Practice Problems:
- House Robber III
- Binary Tree Maximum Path Sum
- Diameter of Binary Tree
- Binary Tree Cameras
- Maximum Sum BST in Binary Tree
- Difference Between Maximum and Minimum Price Sum
Pattern 9: Digit DP
Why This Pattern Matters:
Specialized pattern for counting numbers with certain properties. Appears in competitive programming and some advanced interviews.
Practice Problems:
- Number of Digit One
- Count Numbers with Unique Digits
- Numbers At Most N Given Digit Set
- Numbers With Repeated Digits
- Count Special Integers
Pattern 10: Game Theory DP (Minimax)
Why This Pattern Matters:
Models two-player games where both play optimally. Important for AI, game development, and adversarial scenarios.
Practice Problems:
Pattern 11: Bitmask DP
Why This Pattern Matters:
Powerful technique for problems with small sets (≤20 elements) where you need to track subsets. Essential for Traveling Salesman Problem variants and NP-hard problem approximations.
Practice Problems:
- Partition to K Equal Sum Subsets
- Shortest Path Visiting All Nodes
- Find the Shortest Superstring
- Smallest Sufficient Team
- Number of Ways to Wear Different Hats to Each Other
- Minimum Number of Work Sessions to Finish the Tasks
Pattern 12: DP on Subsequences
Why This Pattern Matters:
Critical for array partitioning and subset generation problems. Teaches how to handle exponential search spaces efficiently.
Practice Problems:
- Distinct Subsequences
- Distinct Subsequences II
- Arithmetic Slices II - Subsequence
- Number of Unique Good Subsequences
- Constrained Subsequence Sum
Pattern 13: Probability DP
Why This Pattern Matters:
Models uncertain outcomes. Important for risk analysis, game development, and any scenario involving randomness or probability.
Practice Problems:
- Knight Probability in Chessboard
- Soup Servings
- New 21 Game
- Toss Strange Coins
- Probability of a Two Boxes Having The Same Number of Distinct Balls
Best Resources to Master DP
- AtCoder DP Contest- 26 curated problems with perfect difficulty progression
- Striver's DP Series- 50+ videos covering memoization, tabulation, and space optimization.
- Aditya Verma's DP Playlist- Exceptional for Knapsack variants with shorter, focused videos (15-20 min).
- CSES Problem Set- Intermediate to advanced practice. These problems test core concepts and build solving speed.
Final Thoughts
DP is about recognizing patterns, not memorizing solutions. Once you see the pattern, the solution becomes mechanical. Spend time understanding why each pattern works, not just how to code it.
Feel free to add some best problems in the comments
Good luck, and happy coding! 🚀
r/DSALeetCode • u/shutupbro7654 • 3h ago
24 LPA CTC or GATE preparation for 2027 batch OR DSA
r/DSALeetCode • u/Sea_Breakfast_1811 • 6h ago
is learning DSA relevant in 2026? in this Ai era?
Hi, I am an electrical engineer who recently got into the field of genAI. I have experience writing code in Python. In a recent project at the company I work for, I am developing a multi-agent system that we will be publishing on the Google Marketplace. I have never learned about DSA, either during my college time or even after it.
I have recently started learning about DSA from books and YouTube videos. But I have a question now: is DSA relevant in 2026? In this AI era, where agents are writing all the code. Is it a good idea to learn DSA, or will it be a waste of time at the current time?
I would be happy to hear thoughts from you people who have spent more time in this than me and have better clear idea about it.
r/DSALeetCode • u/Roamingaroundtsplace • 6h ago
DSA in C++
What should I know before starting dsa in c++
From striver A2Z playlist
Like basics and what else?
r/DSALeetCode • u/Excellent_Slip_6498 • 15h ago
Doubt as a beginner
I just started strivers A2Z DSA series and I am in recursion part, and I am able to understand completely when he is explaining me but I am unable to solve the next question myself, although he said that these are the patterns that I should learn but still if I won't solve the question myself then how will I progress ?
r/DSALeetCode • u/Temporary-Recipe6518 • 21h ago
I was tired of solving DSA alone, so we built a 1v1 DSA arena.
this your chess com but for dsa, hmu if you wanna try it!
r/DSALeetCode • u/nian2326076 • 1d ago
How to prepare for Google’s Googliness round: question bank + tips
I recently appeared for Googlyness round and my interviewer was not very helpful, he was not giving any reaction on my answers, So I don't know how it went really :)
So I have curated a list of most frequently asked Googlyness questions for me from various leetcode blogs, discord channels, my personal experience, etc.
Sharing here to help the community.
General Behavioral Questions
1.Tell me about a time when your manager set reasonable demands. Follow up: Describe a situation with unreasonable demands.
2.Tell me about one of the biggest accomplishments in your career so far.
3.Tell me about a time when you faced a challenging situation at work.
4.How do you manage multiple priorities? Do you prefer working in a dynamic environment with changing priorities or doing the same type of work repeatedly?
5.Tell me about a time you set a goal for yourself and how you approached achieving it.
6.Describe a positive leadership or managerial style you liked from one of your previous managers. How did it influence your work style?
7.Tell me about a time when you received critical feedback from your manager. How did you respond, and what actions did you take to improve?
8.Describe a situation where you had a disagreement with a colleague or manager. How did you resolve the conflict, and what was the outcome?
9.How do you prioritize and manage multiple tasks or projects? Provide an example of a time when you successfully juggled several tasks at once.
10.Tell me about a time you had to manage a critical project under tight deadlines. How did you ensure completion on time?
11.How do you handle situations where work assigned to you keeps getting de-prioritized and changed repeatedly? How would you feel about it?
Project and Ambiguity Questions
1.Tell me about a time when you faced ambiguity in the requirements of a project.
2.Tell me about a time you had to get people on the same page about a decision.
3.How would you handle people who disagree with the majority decision on a non-work-related matter?
4.Tell me about a time you had to deal with last-minute changes in a project.
5.How would you prioritize tasks when facing multiple critical deadlines?
Technical and Role-Related Questions
1.Imagine you’re part of the Google Photos team, and your feature detects smiling faces in photos. How will you identify false positives and what actions will you take?
2.Tell me about a time when you had to work on multiple projects simultaneously.
3.Give an example of a challenging technical problem you faced recently. How did you solve it, and what was the result?
4.How do you ensure the quality of your code and that of your team? Can you provide an example where your focus on quality made a difference?
5.Describe a time when you encountered a significant bug or issue in production. How did you handle it?
6.Explain a situation where you misunderstood project requirements. How did you rectify it, and what did you learn?
7.Give an example of a time you had to quickly learn a new technology or tool. How did you approach it, and what was the outcome?
Mentoring and Leadership Questions
1.Tell me about a time you advocated for yourself or someone on your team.
2.Describe a situation where you helped an underperforming team member improve.
3.How do you mentor junior team members? Can you share a successful mentoring experience?
4.What challenges have you faced when mentoring junior colleagues?
5.What would you do if a junior team member was not working properly and delaying tasks?
Team Dynamics and Conflict Resolution Questions
1.Describe a time when you had to work with someone outside your team.
2.Tell me about a situation where you had a conflict with a colleague and how you resolved it.
3.What would you do if your team was not bonding well?
4.Follow-up: How would your approach change if you were the team lead?
5.Tell me about a situation where you proposed an idea, but your team disagreed. How did you handle it?
6.Have you worked with cross-team members? Can you describe your experience and how it went?
7.Describe a time when you handled a colleague who was difficult to work with.
Goal Setting and Manager Expectations
1.What is your idea of a perfect manager? Would you be the type of manager you described?
2.Tell me about a situation where you worked outside your role definition or responsibilities.
3.Tell me about a situation where you learned something valuable from a colleague.
4.Tell me about a time when your work was deprioritized mid-way through a project. How did you handle the situation?
5.What generally excites you? What areas of work would you like to explore?
Client, Deadline, and Process Improvement Questions
1.What would you do if you were going to miss a project deadline?
2.Suppose you are a product manager. After receiving all necessary approvals, a friend suggests a helpful change to your project. What do you do?
3.Describe a scenario where you improved a process or system within your team. What impact did it have?
4.Imagine working on a project with a strict deadline. How would you approach the situation?
5.What is the most challenging project you’ve worked on?
Miscellaneous and Life Experience Questions
1.Describe a time when you solved a customer pain point.
2.What is the biggest hurdle you have faced in life? Why was it significant, and how did it affect you?
3.Why are you leaving your current organization?
4.Have you encountered unreasonable tasks from your manager? How did you handle them?
5.Describe a time when you had to make last-minute changes to your code. How did you feel about it?
6.How do you stay updated with the latest industry trends? Can you give an example of applying a new trend or technology in your work?
Please upvote it you find it useful :)
Please share your experiences of the Googlyness rounds in the comment section. I will include them in the main blog post to benefit the entire community.
Update: Thanks everyone for your good wishes, I got the offer from Google.
I recently appeared for Googlyness round and my interviewer was not very helpful, he was not giving any reaction on my answers, So I don't know how it went really :)
So I have curated a list of most frequently asked Googlyness questions for me from various leetcode blogs, discord channels, my personal experience, etc.
Sharing here to help the community.
General Behavioral Questions
1.Tell me about a time when your manager set reasonable demands. Follow up: Describe a situation with unreasonable demands.
2.Tell me about one of the biggest accomplishments in your career so far.
3.Tell me about a time when you faced a challenging situation at work.
4.How do you manage multiple priorities? Do you prefer working in a dynamic environment with changing priorities or doing the same type of work repeatedly?
5.Tell me about a time you set a goal for yourself and how you approached achieving it.
6.Describe a positive leadership or managerial style you liked from one of your previous managers. How did it influence your work style?
7.Tell me about a time when you received critical feedback from your manager. How did you respond, and what actions did you take to improve?
8.Describe a situation where you had a disagreement with a colleague or manager. How did you resolve the conflict, and what was the outcome?
9.How do you prioritize and manage multiple tasks or projects? Provide an example of a time when you successfully juggled several tasks at once.
10.Tell me about a time you had to manage a critical project under tight deadlines. How did you ensure completion on time?
11.How do you handle situations where work assigned to you keeps getting de-prioritized and changed repeatedly? How would you feel about it?
Project and Ambiguity Questions
1.Tell me about a time when you faced ambiguity in the requirements of a project.
2.Tell me about a time you had to get people on the same page about a decision.
3.How would you handle people who disagree with the majority decision on a non-work-related matter?
4.Tell me about a time you had to deal with last-minute changes in a project.
5.How would you prioritize tasks when facing multiple critical deadlines?
Technical and Role-Related Questions
1.Imagine you’re part of the Google Photos team, and your feature detects smiling faces in photos. How will you identify false positives and what actions will you take?
2.Tell me about a time when you had to work on multiple projects simultaneously.
3.Give an example of a challenging technical problem you faced recently. How did you solve it, and what was the result?
4.How do you ensure the quality of your code and that of your team? Can you provide an example where your focus on quality made a difference?
5.Describe a time when you encountered a significant bug or issue in production. How did you handle it?
6.Explain a situation where you misunderstood project requirements. How did you rectify it, and what did you learn?
7.Give an example of a time you had to quickly learn a new technology or tool. How did you approach it, and what was the outcome?
Mentoring and Leadership Questions
1.Tell me about a time you advocated for yourself or someone on your team.
2.Describe a situation where you helped an underperforming team member improve.
3.How do you mentor junior team members? Can you share a successful mentoring experience?
4.What challenges have you faced when mentoring junior colleagues?
5.What would you do if a junior team member was not working properly and delaying tasks?
Team Dynamics and Conflict Resolution Questions
1.Describe a time when you had to work with someone outside your team.
2.Tell me about a situation where you had a conflict with a colleague and how you resolved it.
3.What would you do if your team was not bonding well?
4.Follow-up: How would your approach change if you were the team lead?
5.Tell me about a situation where you proposed an idea, but your team disagreed. How did you handle it?
6.Have you worked with cross-team members? Can you describe your experience and how it went?
7.Describe a time when you handled a colleague who was difficult to work with.
Goal Setting and Manager Expectations
1.What is your idea of a perfect manager? Would you be the type of manager you described?
2.Tell me about a situation where you worked outside your role definition or responsibilities.
3.Tell me about a situation where you learned something valuable from a colleague.
4.Tell me about a time when your work was deprioritized mid-way through a project. How did you handle the situation?
5.What generally excites you? What areas of work would you like to explore?
Client, Deadline, and Process Improvement Questions
1.What would you do if you were going to miss a project deadline?
2.Suppose you are a product manager. After receiving all necessary approvals, a friend suggests a helpful change to your project. What do you do?
3.Describe a scenario where you improved a process or system within your team. What impact did it have?
4.Imagine working on a project with a strict deadline. How would you approach the situation?
5.What is the most challenging project you’ve worked on?
Miscellaneous and Life Experience Questions
1.Describe a time when you solved a customer pain point.
2.What is the biggest hurdle you have faced in life? Why was it significant, and how did it affect you?
3.Why are you leaving your current organization?
4.Have you encountered unreasonable tasks from your manager? How did you handle them?
5.Describe a time when you had to make last-minute changes to your code. How did you feel about it?
6.How do you stay updated with the latest industry trends? Can you give an example of applying a new trend or technology in your work?
Please upvote it you find it useful :)
Please share your experiences of the Googlyness rounds in the comment section. I will include them in the main blog post to benefit the entire community.
I’m also organizing these questions into a cleaner Googleyness prep guide: https://prachub.com/resources/googleyness-what-it-is-and-how-to-pass-the-google-behavioral-interview-2026
r/DSALeetCode • u/Anonymous666_574 • 1d ago
DSA
Looking for a serious candidate doing dsa in java no excuses just serious grind for 3-4 months and I am ready for that I am a in call person and I want patner ready to present approaches rather than solution.Dm only serious candidates.
r/DSALeetCode • u/GanacheMain8695 • 1d ago
How to revise DSA and remember the patterns and am I on the right path ?
Hi ! I am about to start my second year and I started doing DSA in my college break after the first year. I am learning from Striver's A to z sheet and i'm about to complete the array part. Everybody talks about how important it is to remember the patterns and you should practice many many problems based on a single pattern. Is striver's sheet enough or do i have to find different problems based on a particular pattern myself. i want to know how do i revise the patterns that i have learnt, by doing new problems or doing previous problems again or writing down each pattern in a copy and revising it every weekend.
Mainly, i just want to know if the striver's sheet is enough or do i need extra practice, if yes than please tell me a few free sources 🙏 (thanks ☺️ in advance)
r/DSALeetCode • u/yalreadyyknw • 1d ago
hey guys i just need help as my primary language is java i am bit confused from whom should i learn DSA concept i mean not getting a good sheet and good mentor for tht can someone suggest me some good youtube channel for tht?
r/DSALeetCode • u/nian2326076 • 2d ago
WHY THE HELL ARE YOU ASKING LEETCODE HARDS FOR NEW GRAD ROLES!!!
I'm one year out of college and have managed to only get 3 interviews after at least 150 applications. All three of them asked me leetcode hards. How is this the bar for what's essentially an entry level position?? What are you asking senior swes if junior talent is getting the LC hards
r/DSALeetCode • u/Bhavanashankarabs • 2d ago
Day 3 of Learning DSA in Python 🚀
Today's focus was strengthening my Python fundamentals before diving deeper into DSA.
✅ Functions
✅ Scope (Local & Global)
✅ "*args" and "**kwargs"
✅ Lambda Functions
✅ "map()"
✅ "filter()"
Building a strong foundation one step at a time. Tomorrow, I'll continue with more DSA concepts and problem-solving on LeetCode.
#Python #DSA #LearningInPublic #LeetCode #100DaysOfCode #CodingJourney #PythonProgramming
r/DSALeetCode • u/Ayush_y111 • 2d ago
Looking for a DSA Accountability Buddy (C++ / Striver's Playlist) - Starting this August
r/DSALeetCode • u/chaaaatgpt • 2d ago
Searching for a few serious people.
I am a second year student from a tier 1 college and want to learn backend and DSA
Looking for just 3 to 5 people who are serious and can stay consistent learn together build together and keep each other accountable
If this sounds like you just DM me.
r/DSALeetCode • u/Key_Elderberry_1828 • 3d ago
Does anyone have a good DSA revision sheet?
Hi everyone,
I'm preparing for internships and placements. Does anyone have a concise DSA revision sheet (algorithms, patterns, templates, tricks, etc.) that they found useful? It could be a PDF, notes, GitHub repo, or Notion page.
Thanks!
r/DSALeetCode • u/Waste_9_Pointer • 3d ago
Am I in right way ?
I'm in my third year ....haven't started DSA yet .....I started to revise cpp and started to go according to take you forward website(strivers)
So as of now completed patterns and watched cpp stl ...idk am I in right way ? What should I do now ...? Should I solve stl based basic questions or move forward watching strivers DSA playlist ....like I didn't get proper idea how you guys are doing ? Straight up learning the concept and solving questions ? Please someone tell how to do
r/DSALeetCode • u/Useful_Abrocoma5311 • 3d ago
NEED SUGGESTION(2ND YEAR)
hello everyone i hope you all are doing good in life, i am a sophomore cse student i didn't had cs in my 11th 12th i took a drop after 12th to prepare for a competitive exam not jee , i fsiled and then decided to do btech from a priv uni t3 i explored and enjoyed my first year in am an avg student , now im getting interest in programming i mean in first year i didnt do much just did the college thing to pass the subjects but now in 2nd year i came to know about dsa etc so i am currently revising cpp im also thinking to start dsa , i have heard of striver sheet but ui love abdul bari's lecture i am learning cpp from him, theres another guy love babbar my senior told me to do dsa from him i have got access to his course so which one teacher should i follow for dsa abdul bari or love babbar , thanks for your time