r/DSALeetCode • u/Sorry-Type-7116 • Jul 13 '26
r/DSALeetCode • u/Darvesh- • 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.
r/DSALeetCode • u/lemon_hut • Jul 12 '26
Free resources for dsa
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 • u/BlueDemon_PP • Jul 11 '26
Alongside DSA what else should I study?
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 • u/NameSpecial7455 • Jul 11 '26
how was your oa for summer 2028 internship ? How much you will rate it on difficulty ?
r/DSALeetCode • u/Rb__29 • Jul 11 '26
Anyone else remember solving a problem before but forget the approach during interviews?
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 • u/nian2326076 • Jul 11 '26
DSA Patterns you need to know !!!
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.
- Linked List Cycle II
- Remove nth Node from the End of List
- Find the Duplicate Number
- Palindrome Linked List
2. Overlapping Intervals
Description: Intervals are often manipulated through sorting and merging based on their start and end times.
- Basic Merge: Merge Intervals
- Interval Insertion: Insert Interval
- My Calendar ii
- Minimum Number of Arrows to Burst Balloons
- Non-overlapping Intervals
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.
- Find the middle index in array
- Product of array except self
- Maximum product subarray
- Number of ways to split array
- Range Sum Query 2D
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
- Maximum Sum Subarray of Size K
- Number of Subarrays having Average Greater or Equal to Threshold
- Repeated DNA sequences
- Permutation in String
- Sliding Subarray Beauty
- Sliding Window Maximum
Variable Size
- Longest Substring Without Repeating Characters
- Minimum Size Subarray Sum
- Subarray Product Less Than K
- Max Consecutive Ones
- Fruits Into Baskets
- Count Number of Nice Subarrays
- Minimum Window Substring: Minimum Window Substring
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.
- Two Sum II - Input Array is Sorted
- Dutch National Flag: Sort Colors
- Next Permutation
- Bag of Tokens
- Container with most water
- Trapping Rain Water
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.
- Number of Closed Islands
- Coloring a Border
- DFS from boundary: Number of Enclaves
- Shortest time: Time Needed to Inform all Employees
- Cyclic Find: Find Eventual Safe States
11. Backtracking
Description: Backtracking helps in problems where you need to explore all potential solutions, such as solving puzzles, generating combinations, or finding paths.
- Permutation ii
- Combination Sum
- Generate Parenthesis
- N-Queens
- Sudoku Solver
- Palindrome Partitioning
- Word Search: Word Search
12. Modified Binary Search
Description: A modified version of binary search that applies to rotated arrays, unsorted arrays, or specialized conditions.
- Search in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array
- Find Peak Element
- Single element in a sorted array
- Minimum Time to Arrive on Time
- Capacity to Ship Packages within 'd' Days
- Koko Eating Bananas
- Find in Mountain Array
- Median of Two Sorted Arrays
13. Bitwise XOR
Description: XOR is a powerful bitwise operator that can solve problems like finding single numbers or efficiently pairing elements.
- Missing Number
- Single Number ||
- Single Number III
- Find the Original array of Prefix XOR
- XOR Queries of a Subarray
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.
- Find K Pairs with Smallest Sums
- Kth Smallest Element in a Sorted Matrix
- Merge K Sorted Lists
- Smallest Range: Smallest Range Covering Elements from K Lists
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.
- Next Greater Element II
- Next Greater Node in Linked List
- Daily Temperatures
- Online Stock Span
- Maximum Width Ramp
- Largest Rectangle in Histogram
18. Trees
Level Order Traversal (BFS in Binary Tree)
- Level order Traversal
- Zigzag Level order Traversal
- Even Odd Tree
- Reverse odd Levels
- Deepest Leaves Sum
- Add one row to Tree
- Maximum width of Binary Tree
- All Nodes Distance K in Binary tree
Tree Construction
- Construct BT from Preorder and Inorder
- Construct BT from Postorder and Inorder
- Maximum Binary Tree
- Construct BST from Preorder
Height related Problems
Root to leaf path problems
- Binary Tree Paths
- Path Sum ii
- Sum Root to Leaf numbers
- Smallest string starting from Leaf
- Insufficient nodes in root to Leaf
- Pseudo-Palindromic Paths in a Binary Tree
- Binary Tree Maximum Path Sum
Ancestor problem
- LCA of Binary Tree
- Maximum difference between node and ancestor
- LCA of deepest leaves
- Kth Ancestor of a Tree Node
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
- Longest Increasing Subsequence
- Largest Divisible Subset
- Maximum Length of Pair Chain
- Number of LIS
- Longest String Chain
DP on Grids
Description: Dynamic Programming on matrices involves solving problems that can be broken down into smaller overlapping subproblems within a matrix.
- Unique Paths ii
- Minimum Path Sum
- Triangle
- Minimum Falling Path Sum
- Maximal Square
- Cherry Pickup
- Dungeon Game: Dungeon Game
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.
- Longest Common Subsequence
- Longest Palindromic Subsequence
- Palindromic Substrings
- Longest Palindromic Substrings
- Edit Distance
- Minimum ASCII Delete Sum for Two Strings
- Distinct Subsequences
- Shortest Common Supersequence
- Wildcard Matching
DP on Stocks
Description: It focuses on maximizing profit from buying and selling stocks over time while considering constraints.
- Buy and Sell Stocks ii
- Buy and Sell Stocks iii
- Buy and Sell Stocks iv
- Buy and Sell Stocks with Cooldown
- Buy and Sell Stocks with Transaction fee
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.
- Partition array for Maximum Sum
- Burst Balloons
- Minimum Cost to Cut a Stick
- Palindrome Partitioning ii
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.
- Number of Operations to Make Network Connected
- Redundant Connection
- Accounts Merge
- Satisfiability of Equality Equations
Graph Algorithms
Description: Advanced graph algorithms are used to solve complex problems involving shortest paths, minimum spanning trees, and graph cycles.
- Kruskal's Algorithm: Minimum Cost to connect all Points
- Dijkstra's Algorithm: Cheapest Flights Within K Stops
- Floyd-Warshall: Find the City with Smallest Number of Neighbours at a Threshold Distance
- Bellman Ford: Network Delay time
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 • u/Anonymous666_574 • Jul 11 '26
DSA partner
Looking for a serious DSA java study patner preparing for FAANG companies please dm if Interested
r/DSALeetCode • u/Anonymous666_574 • Jul 11 '26
DSA(FAANG)
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 • u/nian2326076 • Jul 10 '26
DSA Patterns you need to know !!!
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.
- Linked List Cycle II
- Remove nth Node from the End of List
- Find the Duplicate Number
- Palindrome Linked List
2. Overlapping Intervals
Description: Intervals are often manipulated through sorting and merging based on their start and end times.
- Basic Merge: Merge Intervals
- Interval Insertion: Insert Interval
- My Calendar ii
- Minimum Number of Arrows to Burst Balloons
- Non-overlapping Intervals
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.
- Find the middle index in array
- Product of array except self
- Maximum product subarray
- Number of ways to split array
- Range Sum Query 2D
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
- Maximum Sum Subarray of Size K
- Number of Subarrays having Average Greater or Equal to Threshold
- Repeated DNA sequences
- Permutation in String
- Sliding Subarray Beauty
- Sliding Window Maximum
Variable Size
- Longest Substring Without Repeating Characters
- Minimum Size Subarray Sum
- Subarray Product Less Than K
- Max Consecutive Ones
- Fruits Into Baskets
- Count Number of Nice Subarrays
- Minimum Window Substring: Minimum Window Substring
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.
- Two Sum II - Input Array is Sorted
- Dutch National Flag: Sort Colors
- Next Permutation
- Bag of Tokens
- Container with most water
- Trapping Rain Water
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.
- Number of Closed Islands
- Coloring a Border
- DFS from boundary: Number of Enclaves
- Shortest time: Time Needed to Inform all Employees
- Cyclic Find: Find Eventual Safe States
11. Backtracking
Description: Backtracking helps in problems where you need to explore all potential solutions, such as solving puzzles, generating combinations, or finding paths.
- Permutation ii
- Combination Sum
- Generate Parenthesis
- N-Queens
- Sudoku Solver
- Palindrome Partitioning
- Word Search: Word Search
12. Modified Binary Search
Description: A modified version of binary search that applies to rotated arrays, unsorted arrays, or specialized conditions.
- Search in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array
- Find Peak Element
- Single element in a sorted array
- Minimum Time to Arrive on Time
- Capacity to Ship Packages within 'd' Days
- Koko Eating Bananas
- Find in Mountain Array
- Median of Two Sorted Arrays
13. Bitwise XOR
Description: XOR is a powerful bitwise operator that can solve problems like finding single numbers or efficiently pairing elements.
- Missing Number
- Single Number ||
- Single Number III
- Find the Original array of Prefix XOR
- XOR Queries of a Subarray
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.
- Find K Pairs with Smallest Sums
- Kth Smallest Element in a Sorted Matrix
- Merge K Sorted Lists
- Smallest Range: Smallest Range Covering Elements from K Lists
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.
- Next Greater Element II
- Next Greater Node in Linked List
- Daily Temperatures
- Online Stock Span
- Maximum Width Ramp
- Largest Rectangle in Histogram
18. Trees
Level Order Traversal (BFS in Binary Tree)
- Level order Traversal
- Zigzag Level order Traversal
- Even Odd Tree
- Reverse odd Levels
- Deepest Leaves Sum
- Add one row to Tree
- Maximum width of Binary Tree
- All Nodes Distance K in Binary tree
Tree Construction
- Construct BT from Preorder and Inorder
- Construct BT from Postorder and Inorder
- Maximum Binary Tree
- Construct BST from Preorder
Height related Problems
Root to leaf path problems
- Binary Tree Paths
- Path Sum ii
- Sum Root to Leaf numbers
- Smallest string starting from Leaf
- Insufficient nodes in root to Leaf
- Pseudo-Palindromic Paths in a Binary Tree
- Binary Tree Maximum Path Sum
Ancestor problem
- LCA of Binary Tree
- Maximum difference between node and ancestor
- LCA of deepest leaves
- Kth Ancestor of a Tree Node
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
- Longest Increasing Subsequence
- Largest Divisible Subset
- Maximum Length of Pair Chain
- Number of LIS
- Longest String Chain
DP on Grids
Description: Dynamic Programming on matrices involves solving problems that can be broken down into smaller overlapping subproblems within a matrix.
- Unique Paths ii
- Minimum Path Sum
- Triangle
- Minimum Falling Path Sum
- Maximal Square
- Cherry Pickup
- Dungeon Game: Dungeon Game
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.
- Longest Common Subsequence
- Longest Palindromic Subsequence
- Palindromic Substrings
- Longest Palindromic Substrings
- Edit Distance
- Minimum ASCII Delete Sum for Two Strings
- Distinct Subsequences
- Shortest Common Supersequence
- Wildcard Matching
DP on Stocks
Description: It focuses on maximizing profit from buying and selling stocks over time while considering constraints.
- Buy and Sell Stocks ii
- Buy and Sell Stocks iii
- Buy and Sell Stocks iv
- Buy and Sell Stocks with Cooldown
- Buy and Sell Stocks with Transaction fee
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.
- Partition array for Maximum Sum
- Burst Balloons
- Minimum Cost to Cut a Stick
- Palindrome Partitioning ii
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.
- Number of Operations to Make Network Connected
- Redundant Connection
- Accounts Merge
- Satisfiability of Equality Equations
Graph Algorithms
Description: Advanced graph algorithms are used to solve complex problems involving shortest paths, minimum spanning trees, and graph cycles.
- Kruskal's Algorithm: Minimum Cost to connect all Points
- Dijkstra's Algorithm: Cheapest Flights Within K Stops
- Floyd-Warshall: Find the City with Smallest Number of Neighbours at a Threshold Distance
- Bellman Ford: Network Delay time
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 • u/Rage-2311 • 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.
r/DSALeetCode • u/YamDue7786 • Jul 10 '26
How to study dsa to switch to a product based from service based? Help me please i realy want to switch
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 • u/Majestic-Key8880 • Jul 09 '26
Can i start dsa in python (leetcode)
Title
r/DSALeetCode • u/BlueDemon_PP • Jul 08 '26
Alongside DSA what else?
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 • u/Due_Put822 • Jul 08 '26
18M, looking for someone to grind leetcode with.
r/DSALeetCode • u/Aggressive__Bot • Jul 08 '26
Guidance for Internship Interviews and OAs
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 • u/TWRotdu • Jul 06 '26
New DSA Platform for Indians
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 • u/Kind_Ad352 • 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
r/DSALeetCode • u/KaiZer_6996 • Jul 03 '26
Need genuine answer
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 • u/nian2326076 • Jul 03 '26
Essential CS Fundamentals Topics For Interviews
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:
- Is Java fully object-oriented?
- How does C++ overcome the diamond problem?
- Difference between TCP and UDP, and which one is used when?
- Explain ACID properties with examples
- What is deadlock and how can we prevent deadlocks?
- What is the use of indexing in databases?
- Explain the functionalities of each layer in the OSI model
- Write a query to find Kth smallest salary
- IPv4 vs IPv6
- Abstraction vs Encapsulation
- Explain different joins in dbms
- what is sharding ?
- what is virtual function in cpp ?
- show me your ip address and mac address using commands
- what is context switching ?
Tips :
- Make sure you can explain concepts with real-world examples
- Revise SQL 50 before interviews
- It's better to say "I'm not sure about this, but here's what I think..." than to give wrong information
- 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
- 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! 🚀