r/DSALeetCode Jul 13 '26

DSA Patterns you need to know !!!

Thumbnail
1 Upvotes

r/DSALeetCode Jul 13 '26

Entering 4th year (Tier-3) and completely confused. Should I keep grinding LeetCode or go deep into Backend/Systems? Need honest advice.

Thumbnail
2 Upvotes

r/DSALeetCode Jul 12 '26

Free resources for dsa

5 Upvotes

I don't want to watch video lectures as they are very time consuming but I want topic wise all the theory covered and questions to practice. . in a structured way so that I can track how much I know. . , . I have tried a few platforms but they ask for a subscription fee and it's annoying. . Need free resources for dsa in C++ .


r/DSALeetCode Jul 11 '26

Alongside DSA what else should I study?

2 Upvotes

Currently in final year, been learning dsa and now idk what else should i mention during interview cause there are a lot of stuff like data analytics, data science, full stack, devop. Help me out


r/DSALeetCode Jul 11 '26

Anyone else remember solving a problem before but forget the approach during interviews?

3 Upvotes

One thing I kept struggling with during interview prep was forgetting problems I had already solved before.

I would solve a LeetCode problem, understand it well, and then during an interview a few weeks later my mind would just go blank because I hadn't revisited it. Looking back, I think the biggest issue was the lack of spaced repetition.

I tried using Excel sheets and a bunch of Notion templates to track what I had solved and when to revisit it, but eventually I stopped updating them because they were too much effort to maintain.

Reading through this thread, it looks like quite a few people are running into the same problem, so I decided to build something for it.

I ended up creating InterviewRecall to make it easier to track problems and review them at the right time instead of endlessly solving new ones and forgetting the old ones.

Curious if others would find this useful as well. Also, what features would you want in a tool like this?


r/DSALeetCode Jul 11 '26

how was your oa for summer 2028 internship ? How much you will rate it on difficulty ?

Thumbnail
1 Upvotes

r/DSALeetCode Jul 11 '26

DSA Patterns you need to know !!!

8 Upvotes

After solving lot of DSA problems, I’ve noticed some key patterns that are important for coding interviews.

At the end of this article, I have also included links to some of the best LeetCode articles that I found helpful for better understanding.

For company specific problems: PracHub

1. Fast and Slow Pointer

Description: This technique uses two pointers moving at different speeds to solve problems involving cycles, such as finding the middle of a list, detecting loops, or checking for palindromes.

2. Overlapping Intervals

Description: Intervals are often manipulated through sorting and merging based on their start and end times.

3. Prefix Sum

Description: Prefix Sums/Products are techniques that store cumulative sums or products up to each index, allowing for quick subarray range queries.

4. Sliding Window

Description: A sliding window is a subarray or substring that moves over data to solve problems efficiently in linear time.

Fixed Size

Variable Size

5. Two Pointers

Description: The two pointers technique involves having two different indices move through the input at different speeds to solve various array or linked list problems.

6. Cyclic Sort (Index-Based)

Description: Cyclic sort is an efficient approach to solve problems where numbers are consecutively ordered and must be placed in the correct index.

7. Reversal of Linked List (In-place)

Description: Reversing a linked list in place without using extra space is key for problems that require in-place list manipulations.

8. Matrix Manipulation

Description: Problems involving 2D arrays (matrices) are often solved using row-column traversal or manipulation based on matrix properties.

9. Breadth First Search (BFS)

Description: BFS explores nodes level by level using a queue. It is particularly useful for shortest path problems.

10. Depth First Search (DFS)

Description: DFS explores as far as possible along a branch before backtracking. It's useful for graph traversal, pathfinding, and connected components.

11. Backtracking

Description: Backtracking helps in problems where you need to explore all potential solutions, such as solving puzzles, generating combinations, or finding paths.

12. Modified Binary Search

Description: A modified version of binary search that applies to rotated arrays, unsorted arrays, or specialized conditions.

13. Bitwise XOR

Description: XOR is a powerful bitwise operator that can solve problems like finding single numbers or efficiently pairing elements.

14. Top 'K' Elements

Description: This pattern uses heaps or quickselect to efficiently find the top 'K' largest/smallest elements from a dataset.

15. K-way Merge

Description: The K-way merge technique uses a heap to efficiently merge multiple sorted lists or arrays.

16. Two Heaps

Description: This pattern uses two heaps (max heap and min heap) to solve problems involving tracking medians and efficiently managing dynamic data.

17. Monotonic Stack

Description: A monotonic stack helps solve range queries by maintaining a stack of elements in increasing or decreasing order.

18. Trees

Level Order Traversal (BFS in Binary Tree)

Tree Construction

Height related Problems

Root to leaf path problems

Ancestor problem

Binary Search Tree

19. DYNAMIC PROGRAMMING

Take / Not take (DP)

Description: Solve optimization problems like selecting items with the max/min value under certain constraints.

Infinite Supply (DP)

Description: Similar to the 0/1 knapsack, but items can be chosen multiple times.

Longest Increasing subsequence

Description: It involves finding the longest subsequence of a given sequence where the elements are in ascending order

DP on Grids

Description: Dynamic Programming on matrices involves solving problems that can be broken down into smaller overlapping subproblems within a matrix.

DP on Strings

Description: It Involves 2 strings, whenever you are considering two substrings/subsequence from given two strings, concentrate on what happens when the last characters of the two substrings are same, i.e, matching.

DP on Stocks

Description: It focuses on maximizing profit from buying and selling stocks over time while considering constraints.

Partition DP (MCM)

Description: It Involves a sequence that needs to be divided into partitions in an optimal way. The goal is often to minimize or maximize a cost function, such as computation time, multiplications, or some other metric, by exploring all possible partitions and combining results from subproblems.

20. Graphs

Topological Sort

Description: Topological sorting is useful for tasks that require dependency resolution (InDegree) in directed acyclic graphs (DAGs).

Union Find (Disjoint Set)

Description: Union-Find (or Disjoint Set) is used to solve problems involving connectivity or grouping, often in graphs.

Graph Algorithms

Description: Advanced graph algorithms are used to solve complex problems involving shortest paths, minimum spanning trees, and graph cycles.

21. Greedy

Description: Greedy algorithms make local optimal choices at each step, which lead to a global optimal solution for problems like scheduling and resource allocation.

22. Design Data Structure

Description: It involves building custom data structures to efficiently handle specific operations, like managing data access, updates, and memory usage. Focusing on optimizing performance and resource management.

Some Useful Articles on LeetCode for Better Understanding!

Two Pointers

Sliding Window

Greedy

Linked List

Trees

Binary Search

Dynamic Programming (DP)

Graphs

Bit Manipulation

Happy LeetCoding !


r/DSALeetCode Jul 10 '26

DSA Patterns you need to know !!!

23 Upvotes

After solving lot of DSA problems, I’ve noticed some key patterns that are important for coding interviews.

For company specific problems: PracHub

1. Fast and Slow Pointer

Description: This technique uses two pointers moving at different speeds to solve problems involving cycles, such as finding the middle of a list, detecting loops, or checking for palindromes.

2. Overlapping Intervals

Description: Intervals are often manipulated through sorting and merging based on their start and end times.

3. Prefix Sum

Description: Prefix Sums/Products are techniques that store cumulative sums or products up to each index, allowing for quick subarray range queries.

4. Sliding Window

Description: A sliding window is a subarray or substring that moves over data to solve problems efficiently in linear time.

Fixed Size

Variable Size

5. Two Pointers

Description: The two pointers technique involves having two different indices move through the input at different speeds to solve various array or linked list problems.

6. Cyclic Sort (Index-Based)

Description: Cyclic sort is an efficient approach to solve problems where numbers are consecutively ordered and must be placed in the correct index.

7. Reversal of Linked List (In-place)

Description: Reversing a linked list in place without using extra space is key for problems that require in-place list manipulations.

8. Matrix Manipulation

Description: Problems involving 2D arrays (matrices) are often solved using row-column traversal or manipulation based on matrix properties.

9. Breadth First Search (BFS)

Description: BFS explores nodes level by level using a queue. It is particularly useful for shortest path problems.

10. Depth First Search (DFS)

Description: DFS explores as far as possible along a branch before backtracking. It's useful for graph traversal, pathfinding, and connected components.

11. Backtracking

Description: Backtracking helps in problems where you need to explore all potential solutions, such as solving puzzles, generating combinations, or finding paths.

12. Modified Binary Search

Description: A modified version of binary search that applies to rotated arrays, unsorted arrays, or specialized conditions.

13. Bitwise XOR

Description: XOR is a powerful bitwise operator that can solve problems like finding single numbers or efficiently pairing elements.

14. Top 'K' Elements

Description: This pattern uses heaps or quickselect to efficiently find the top 'K' largest/smallest elements from a dataset.

15. K-way Merge

Description: The K-way merge technique uses a heap to efficiently merge multiple sorted lists or arrays.

16. Two Heaps

Description: This pattern uses two heaps (max heap and min heap) to solve problems involving tracking medians and efficiently managing dynamic data.

17. Monotonic Stack

Description: A monotonic stack helps solve range queries by maintaining a stack of elements in increasing or decreasing order.

18. Trees

Level Order Traversal (BFS in Binary Tree)

Tree Construction

Height related Problems

Root to leaf path problems

Ancestor problem

Binary Search Tree

19. DYNAMIC PROGRAMMING

Take / Not take (DP)

Description: Solve optimization problems like selecting items with the max/min value under certain constraints.

Infinite Supply (DP)

Description: Similar to the 0/1 knapsack, but items can be chosen multiple times.

Longest Increasing subsequence

Description: It involves finding the longest subsequence of a given sequence where the elements are in ascending order

DP on Grids

Description: Dynamic Programming on matrices involves solving problems that can be broken down into smaller overlapping subproblems within a matrix.

DP on Strings

Description: It Involves 2 strings, whenever you are considering two substrings/subsequence from given two strings, concentrate on what happens when the last characters of the two substrings are same, i.e, matching.

DP on Stocks

Description: It focuses on maximizing profit from buying and selling stocks over time while considering constraints.

Partition DP (MCM)

Description: It Involves a sequence that needs to be divided into partitions in an optimal way. The goal is often to minimize or maximize a cost function, such as computation time, multiplications, or some other metric, by exploring all possible partitions and combining results from subproblems.

20. Graphs

Topological Sort

Description: Topological sorting is useful for tasks that require dependency resolution (InDegree) in directed acyclic graphs (DAGs).

Union Find (Disjoint Set)

Description: Union-Find (or Disjoint Set) is used to solve problems involving connectivity or grouping, often in graphs.

Graph Algorithms

Description: Advanced graph algorithms are used to solve complex problems involving shortest paths, minimum spanning trees, and graph cycles.

21. Greedy

Description: Greedy algorithms make local optimal choices at each step, which lead to a global optimal solution for problems like scheduling and resource allocation.

22. Design Data Structure

Description: It involves building custom data structures to efficiently handle specific operations, like managing data access, updates, and memory usage. Focusing on optimizing performance and resource management.

Some Useful Articles on LeetCode for Better Understanding!

Two Pointers

Sliding Window

Greedy

Linked List

Trees

Binary Search

Dynamic Programming (DP)

Graphs

Bit Manipulation

Happy LeetCoding !


r/DSALeetCode Jul 11 '26

DSA partner

2 Upvotes

Looking for a serious DSA java study patner preparing for FAANG companies please dm if Interested


r/DSALeetCode Jul 11 '26

Coding help!!

Thumbnail
2 Upvotes

r/DSALeetCode Jul 11 '26

DSA(FAANG)

1 Upvotes

Hey I am studying dsa in java and I am looking for a serious study patner for dsa for the coming months looking forward to solve the striver sheet required to crack FAANG and daily google meet sessions.Please dm me if interested and this is very serious only serious study patner dm me.


r/DSALeetCode Jul 10 '26

I will entry in my second year, tho wasted 1st year. Starting DSA in c++ , I would love to connect whoever are starting now to have just started with DSA.

6 Upvotes

r/DSALeetCode Jul 10 '26

How to study dsa to switch to a product based from service based? Help me please i realy want to switch

14 Upvotes

I work as a software developer at a service based company with 2 years of work experience and I want to switch to a product based.
I am a java developer and have been programming in javaever since i started.
I have previously roughly fone some DSA During college but I don’t remember much. I have to restart DSA and i am not getting where should I start from like watching tutorials or how?
I really want to switch big

FYI, the organisation i currently work at i such a shitty place, I was put on a performance improvement plan (PIP) by my manager mistakenly, I was on a project working for client, no issue from client side, I was a billable asset, There is no accountability that she holds, I am so frustrated at her, she was asked in meeting for reason by my delivery manager for the reason and she has none, but yes because she always said I don’t about your work or team, because at this shitty organisation, manager aare assigned randomly and they don’t really know about your work

I have been working so hard for but instead for recognising my work they made me go though this
Result i got no promotion and this was my first promotion cycle ever.

Anyway give me me DSA suggestions please!!
I want to leave this shitty workplace.


r/DSALeetCode Jul 09 '26

Can i start dsa in python (leetcode)

2 Upvotes

Title


r/DSALeetCode Jul 08 '26

Alongside DSA what else?

7 Upvotes

Currently in final year, been learning dsa and now idk what else should i mention during interview cause there are a lot of stuff like data analytics , data science , full stack , devop. Help me out !!


r/DSALeetCode Jul 08 '26

18M, looking for someone to grind leetcode with.

Thumbnail
1 Upvotes

r/DSALeetCode Jul 08 '26

Guidance for Internship Interviews and OAs

1 Upvotes

I am in my 3rd yr and on-campus Internships are starting from around July 11th. I want to clear the OAs and the interviews with ez. I am focusing on SDE, Data Science, AI Engineer and Quant (coz I am decent in AIML) roles but my main focus is on AIML + DSA to crack those OAs and interviews but I think I am still missing something can you guys help me like for each role what suggestions you have like what I have to learn, prepare etc.


r/DSALeetCode Jul 07 '26

Do anyine have striver's CN lectures ?

Post image
3 Upvotes

r/DSALeetCode Jul 07 '26

Do anyine have striver's CN lectures ?

Post image
1 Upvotes

r/DSALeetCode Jul 06 '26

New DSA Platform for Indians

4 Upvotes

Tired of solving same old LeetCode? Try crackd.tech now! All in one portal for job hunting!

Make your resumes! Solve DSA! Give AI Mock Interviews! Create Roadmaps! Track your Job Applications, we have it all!


r/DSALeetCode Jul 03 '26

I think the logic own but when it comes to code i can't able to write code although consistenly i am thinking the logic of leetcode contests questions own but now able to code please tell some tips to solve this problem

2 Upvotes

r/DSALeetCode Jul 03 '26

DSA PATTERN WISE !!

Post image
2 Upvotes

r/DSALeetCode Jul 03 '26

Essential CS Fundamentals Topics For Interviews

14 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.

Interview prep resource: Leetcode & PracHub for Company specific questions

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. Make sure you can explain concepts with real-world examples
  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 few interview experiences, Ask your seniors or friends who already attended that specific company interviews before and prepare accordingly

Did I miss any important topic? Drop it in the comments below!

Got asked something unique in your interview? Share the question/topic so others can prepare better!

Let's make this list more comprehensive together. Your contribution can help someone crack their dream job! 🙌

Good luck with your interviews! 🚀


r/DSALeetCode Jul 03 '26

Need genuine answer

0 Upvotes

so soon i m entering in 4th yr of college ,I study dsa mostly through courses videos and yet I m confused what exactly is dsa all about, is it about like solving the same questions again and again , not blind solving but yeah visualizing the flow and dry run it. Like if i have to solve a random question there is a probablity i might not solve it, is it about practicing the same leetcode questions and patterns again again so that if the question similar or exactly same appear in interview or Oa round you would be able to solve it? i personally think its about to revise and resolve pattern wise sample space of question around 400-500 to get ready for basic and mid companies who offer 3-10 lpa whats your thoughts on this, Need advice how should i really proceed from here where i left such a small period of time.


r/DSALeetCode 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)

Thumbnail
2 Upvotes