Introduction to DSA and Java Fundamentals for Interviews
DSA: Your Interview Edge
Java Basics Refresher
OOP for DSA
Java's Core Libraries
Your Coding Workspace
Debugging Essentials
Why Efficiency Matters
Counting Operations
Big O Notation: Time
Big O Notation: Space
Best, Avg, Worst Case
Complexity Examples
Arrays: Basics and One-Dimensional Problems
What's an Array?
Arrays in Java: The Basics
Array Traversal
Array Memory & Big O
Searching in Arrays
Min/Max in Arrays
Summing Array Elements
Reversing an Array
Duplicate Elements
Rotating an Array
Removing Elements
Arrays: Two-Pointers Technique
Meet the Two Pointers
Why Two Pointers?
Finding Pairs in Sorted
Three Sum Problem
Closest Sum to Target
Reverse an Array
Remove Duplicates
Move Zeroes
Partitioning Arrays
Container With Most Water
Valid Palindrome
Subsequence Check
Arrays: Sliding Window Technique
Intro to Sliding Window
Fixed Window: Max Sum
Fixed Window: Averages
Variable Window: Intro
Variable Window: Max Sum
Variable Window: Min Length
Longest Substring K Distinct
Longest Substring No Repeats
Permutation in String
Anagrams in String
Min Window Substring
Optimizing Window Logic
Sliding Window with Deque
Practice: Array Problems
Practice: String Problems
Arrays: Prefix Sums and Difference Arrays
Why Prefix Sums?
Building Prefix Sum Array
Querying Range Sums
Complexity of Prefix Sums
Equilibrium Index
Subarray Sum Equals K
Max Subarray Sum (Kadane's)
Intro to Difference Arrays
Building Difference Array
Range Updates with Diff Array
Applying Difference Arrays
Multi-Dimensional Arrays and Matrix Problems
Meet Your First Matrix
Walking Through a Matrix
Finding Your Way in 2D
Flipping the Matrix
Spinning the Grid
The Spiral Journey
Boundary Patrol
Zeroing Out Rows/Cols
Strings: Fundamentals and Manipulation
String: Immutable Power
String Creation & Pool
StringBuilder & Buffer
Concatenate & Substring
Search & Replace
Case & Trim
Char Array & Bytes
Palindrome Check
Anagram Detection
Character Counting
Strings: Advanced Techniques and Pattern Matching
Two Pointers for Strings
Sliding Window for Strings
String Compression
Longest Common Prefix
Character Frequency Maps
Valid Parentheses
String Permutations
Intro to String Hashing
Rolling Hash Concept
Linked Lists: Singly Linked Lists
Arrays vs. Linked Lists
What's a Linked List?
Building a Node Class
Traversing the List
Adding to the List
Removing from the List
Finding Elements
Reversing a Linked List
Middle of the List
Detecting a Cycle
Removing Duplicates
Linked Lists: Doubly Linked Lists and Circular Linked Lists
Meet the Doubly Linked List
Building Your DLL Node
Adding Elements to DLL
Removing Elements from DLL
Traversing Your DLL
Meet the Circular LL
Basic Circular LL Ops
Which List When?
Complexity of DLL & CLL
Linked Lists: Advanced Problems and Two-Pointer Applications
Cycle Detection: Fast/Slow
Cycle Start Node
Nth Node From End
Merge Two Sorted Lists
Reorder List
Odd Even Linked List
Partition List
Remove Duplicates Sorted List
Remove Duplicates II
Stacks: LIFO Data Structure
Meet the Stack: LIFO
Basic Stack Operations
Stack with Array
Stack with Linked List
Balanced Parentheses
Next Greater Element
Infix to Postfix
Postfix Evaluation
Min Stack
Queues: FIFO Data Structure
Meet the Queue
Basic Queue Operations
Queue with an Array
Queue with Linked List
Java's Queue Interface
Printer Queue Problem
Recent Calls Counter
BFS: Level Order Traversal
Deques and Priority Queues
Meet the Deque
Deque Operations in Java
Sliding Window Max/Min
Intro to Priority Queues
Heaps: The Core of PQ
Java's PriorityQueue
Kth Smallest/Largest
Merge K Sorted Lists
Hashing: Hash Functions and Collision Resolution
Why Hashing?
Hashing: The Big Idea
What's a Hash Function?
Good Hash Function Traits
Collisions: The Problem
Chaining: Linked Lists
Open Addressing: Linear Probe
Open Addressing: Quadratic Probe
Open Addressing: Double Hashing
Chaining vs. Open Addressing
Load Factor & Rehashing
Hash Table Complexity
When to Use Hashing
Hash Maps and Hash Sets in Java
HashMap: Under the Hood
Using HashMap Effectively
HashSet: Unique Elements
Frequency Counting Fun
Spotting Duplicates
Two Sum & Variations
Advanced Hash Map Applications
Counting Frequencies
Grouping Anagrams
Longest Consecutive Seq
Subarray Sum Equals K
Two Sum & Variations
First Unique Character
Isomorphic Strings
Map vs. Other Structures
Optimizing with Hash Maps
Recursion: Fundamentals and Base Cases
What is Recursion?
Recursion vs. Iteration
The Base Case
The Recursive Step
Call Stack in Recursion
Factorial Fun
Summing Up Numbers
Fibonacci Sequence
Power of a Number
Debugging Recursive Code
Tail Recursion (Concept)
Recursion: Backtracking and Decision Trees
What is Backtracking?
Decision Trees & State
Basic Backtracking Template
Permutations of an Array
Permutations with Duplicates
Combinations (k elements)
Combination Sum I
Combination Sum II
Subsets (Power Set)
Subsets with Duplicates
N-Queens Problem
Sudoku Solver
Recursion: Divide and Conquer Paradigm
What's Divide & Conquer?
D&C vs. Other Approaches
Binary Search: D&C in Action
Merge Sort: The Idea
Merge Sort: Implementation
Recurrence Relations Intro
Recurrence for D&C
Solving Recurrences (Intro)
Master Theorem (Concept)
D&C Complexity Analysis
When to Use D&C
D&C Problem Patterns
Sorting Algorithms: Bubble, Selection, and Insertion Sort
Why Sort? The Basics
Big O for Sorting
Bubble Sort: The Idea
Bubble Sort: Java Code
Bubble Sort: Optimizations
Bubble Sort: Complexity
Selection Sort: The Idea
Selection Sort: Java Code
Selection Sort: Complexity
Insertion Sort: The Idea
Insertion Sort: Java Code
Insertion Sort: Complexity
Basic Sorts: When to Use?
Sorting Algorithms: Merge Sort
Divide & Conquer Intro
Merge Sort: The Idea
Merging Two Sorted Arrays
Merge Sort for Arrays
Merge Sort for Linked Lists
Merge Sort Complexity
Merge Sort Stability
When to Use Merge Sort
Sorting Algorithms: Quick Sort
Quick Sort: The Idea
The Partitioning Step
Lomuto Partition Scheme
Hoare Partition Scheme
Quick Sort in Action
Choosing the Right Pivot
Randomized Quick Sort
Median-of-Three Pivot
Quick Sort Complexity
In-Place Sorting
Quick Sort vs. Merge Sort
Sorting Algorithms: Heap Sort
What's a Heap?
Heap as an Array
The Heapify Operation
Building a Heap
Heap Sort: The Idea
Implementing Heap Sort
Heap Sort Complexity
Heap Sort vs. Others
Searching Algorithms: Linear and Binary Search
Why Search?
Linear Search: The Basics
Linear Search: Complexity
Binary Search: The Prereq
Binary Search: Iterative
Binary Search: Recursive
Binary Search: Complexity
When to Use Which Search?
Searching Algorithms: Advanced Binary Search Applications
First/Last Occurrence
Count Occurrences
Smallest Greater Element
Largest Smaller Element
Square Root (Integer)
Peak Element
Min in Rotated Array
Search Rotated Array
Kth Smallest in Matrix
Aggressive Cows Problem
Book Allocation Problem
Trees: Introduction and Tree Traversals
What's a Tree?
Tree Types: General & Binary
Binary Tree Structure
DFS: Inorder Traversal
DFS: Preorder Traversal
DFS: Postorder Traversal
DFS: Iterative Approaches
BFS: Level Order Traversal
Level Order: Variations
Binary Trees: Properties and Operations
Tree Properties Deep Dive
Balanced vs. Unbalanced
Counting Nodes
Calculating Tree Height
Is It Balanced?
Mirror, Mirror
Are They Identical?
Subtree Check
Binary Search Trees (BSTs): Fundamentals
What's a BST?
BST Structure in Java
Searching in a BST
Inserting into a BST
Deleting from a BST
Is it a Valid BST?
BST Efficiency
Binary Search Trees (BSTs): Advanced Operations
Min & Max in a BST
In-order Successor
In-order Predecessor
BST from Sorted Array
BST from Pre-order
Why Balance BSTs?
AVL Trees: The Idea
Red-Black Trees: The Idea
Balancing Act: When to Use
Heaps: Min-Heap and Max-Heap
What's a Heap?
Heap as an Array
Adding to a Heap
Removing from a Heap
Peeking at the Top
Building a Heap
Java's PriorityQueue
Kth Smallest/Largest
Merge K Sorted Lists
Top K Elements
Graphs: Introduction and Representation
What's a Graph?
Graph Types: Directed/Undirected
Graph Types: Weighted/Unweighted
Graph Terminology
Graphs in the Real World
Adjacency Matrix
Adjacency List
Matrix vs. List: Space
Matrix vs. List: Time
Choosing the Right Rep
Graphs: Breadth-First Search (BFS)
BFS: The Level Order Way
BFS: Queue is Your Friend
BFS: Time & Space
Shortest Path: Unweighted
BFS on a Grid
Multi-Source BFS
Connected Components
Cycle Detection: Undirected
Bipartite Check with BFS
Graphs: Depth-First Search (DFS)
DFS: The Deep Dive
DFS with Recursion
DFS with a Stack
DFS Complexity Analysis
Finding All Paths (DFS)
Connected Components
Island Counting (Grid DFS)
Topological Sort (DFS)
Cycle Detection (Undirected)
Cycle Detection (Directed)
Strongly Connected Comp.
Backtracking with DFS
Graphs: Minimum Spanning Trees (MST)
What's an MST?
MST Properties & Cuts
Prim's Algorithm: Idea
Prim's: Code & Walkthrough
Prim's: Complexity
Kruskal's Algorithm: Idea
DSU for Kruskal's
Kruskal's: Code & Walkthrough
Kruskal's: Complexity
Prim vs. Kruskal
MST Problem Practice
Graphs: Shortest Path Algorithms (Dijkstra's)
Intro to Shortest Paths
Dijkstra's Core Idea
Manual Dijkstra Trace
Data Structures for Dijkstra
Dijkstra's Implementation
Complexity Analysis
Shortest Path in Grid
Network Delay Time
Cheapest Flights
Graphs: Shortest Path Algorithms (Bellman-Ford and Floyd-Warshall)
Bellman-Ford Intro
Bellman-Ford Logic
Bellman-Ford: Negative Cycles
Implement Bellman-Ford
Bellman-Ford Complexity
Floyd-Warshall Intro
Floyd-Warshall Logic
Implement Floyd-Warshall
Floyd-Warshall Complexity
Dijkstra vs. Bellman-Ford
Single vs. All-Pairs Paths
All 3 Shortest Path Algos
Shortest Path Problems
Disjoint Set Union (DSU) / Union-Find
Intro to Disjoint Sets
Representing Sets
The Find Operation
The Union Operation
Path Compression
Union by Rank
Union by Size
DSU Complexity
Connected Components
Cycle Detection
Kruskal's Algorithm
Redundant Connections
What's a Trie?
Trie Node Structure
Building a Trie: Insert
Finding Words: Search
Finding Prefixes: StartsWith
Trie for Autocomplete
Trie for Spell Checker
Longest Common Prefix
Word Search II (Conceptual)
Dynamic Programming: Introduction and Memoization
What is Dynamic Prog?
Overlapping Subproblems
Optimal Substructure
Recursion to the Rescue
Fibonacci: Naive Recursion
Memoization: The Idea
Fibonacci: With Memoization
Memoization: Complexity
Coin Change: Naive Recursion
Coin Change: With Memoization
Memoization vs. Tabulation
Dynamic Programming: Tabulation and Space Optimization
DP: Bottom-Up Thinking
Fibonacci with Tabulation
Climbing Stairs: Tabulation
Space-Optimized Fibonacci
Climbing Stairs: Space Opt
Unique Paths: Tabulation
Unique Paths: Space Opt
Longest Common Subsequence
Knapsack Problem Intro
Dynamic Programming: Common Patterns (1D DP)
Intro to 1D DP Patterns
Max Subarray Sum
House Robber: Simple
Climbing Stairs & Min Cost
Longest Increasing Subseq
LIS: Binary Search Opt
Decode Ways
Partition Equal Subset Sum
Systematic DP Approach
Space Optimization in 1D
Dynamic Programming: Common Patterns (2D DP)
Grid DP Basics
Unique Paths
Minimum Path Sum
Paths with Obstacles
Longest Common Subsequence
Printing LCS
Edit Distance
String Conversion Problems
Knapsack Problem (0/1)
Subset Sum Problem
Partition Equal Subset Sum
What's Greedy?
When Greedy Works
Activity Selection
Coin Change (Greedy Case)
Fractional Knapsack
Proving Greedy Correctness
When Greedy Fails
Binary: The Digital ABCs
Bitwise AND & OR
Bitwise XOR & NOT
Left & Right Shifts
Check a Bit
Set a Bit
Clear a Bit
Toggle a Bit
Count Set Bits
Power of Two?
Single Number
Missing Number
Swap Without Temp
Bit Manipulation: Advanced Techniques
XOR for Unique Numbers
Two Unique Numbers
Representing Sets with Bits
Generating Subsets
Gray Code Generation
Power of Two Check
Counting Set Bits (Hamming)
Swapping Without Temp
Bitwise AND Range
Java Collections Framework: Lists and Sets
Why Collections?
The List Interface
ArrayList: Under the Hood
ArrayList in Action
LinkedList: Under the Hood
LinkedList in Action
ArrayList vs. LinkedList
The Set Interface
HashSet: Under the Hood
HashSet in Action
LinkedHashSet: Order Matters
TreeSet: Sorted Uniques
Set Implementations Compared
Collections Class Helpers
Java Collections Framework: Maps and Queues
What's a Map?
HashMap: The Basics
LinkedHashMap: Order Matters
TreeMap: Sorted Keys
Choosing the Right Map
Queue: First In, First Out
ArrayDeque: Flexible Queue
PriorityQueue: Ordered Retrieval
Deque: Double-Ended Queue
Map Problems: Frequency
Map Problems: Two Sum & More
Queue Problems: BFS Foundation
PriorityQueue: Kth Element
Deque: Sliding Window Max/Min
Collections Framework Power
Problem Solving Strategies: Pattern Recognition
Why Patterns Matter
Deconstructing a Problem
Input/Output Clues
Arrays: Two Pointers
Arrays: Sliding Window
Arrays: Prefix Sums
Hashing: Lookups & Frequencies
Recursion & Backtracking
Dynamic Programming Clues
Trees: Traversal & Structure
Graphs: Connections & Paths
Adapting Known Solutions
Hybrid Approaches
Categorizing Practice
Problem Solving Strategies: Optimizing Solutions
Brute Force: First Pass
Spotting Red Flags
Choosing the Right Tool
Hash Maps to the Rescue
Stacks & Queues for Order
Two Pointers Power-Up
Sliding Window Magic
Prefix Sums for Ranges
Memoization: Top-Down DP
Tabulation: Bottom-Up DP
Space Optimization in DP
Comparing Solutions
Meeting Constraints
Problem Solving Strategies: Edge Cases and Constraints
What are Edge Cases?
Empty & Null Inputs
Single Element Inputs
Boundary Conditions
Understanding Constraints
Complexity & Constraints
Memory Constraints
Developing Test Cases
Debugging Techniques
Fixing Constraint Violations
Interview Simulation: Communication and Whiteboarding
What Interviewers Seek
Your Interview Toolkit
Clarifying the Problem
Thinking Out Loud
Choosing Your Approach
Structuring Your Code
Step-by-Step Execution
Complexity Analysis
Debugging Live
Responding to Hints
Optimizing Your Solution
Mock Interview: Problem 1
Mock Interview: Problem 2
Interview Simulation: Behavioral and System Design Basics
Why Behavioral Questions?
The STAR Method
Tell Me About Yourself
Strengths & Weaknesses
Teamwork & Conflict
Failure & Learning
Why This Company?
What is System Design?
Key Design Principles
Components of a System
Databases: SQL vs NoSQL
Load Balancers & Caching
Designing a URL Shortener
Designing a Chat App
Advanced Recursion: Permutations and Combinations
What's a Permutation?
Permutations: Basic Recursion
Permutations with Duplicates
Permutations: Time & Space
What's a Combination?
Combinations: Basic Recursion
Combinations with Duplicates
Combinations: Fixed Size
Combinations: Time & Space
Permutations of a String
Combination Sum I
Letter Case Permutations
Advanced Recursion: Subsets and Power Set
What's a Subset?
Recursive Subset Logic
Subsets: Simple Array
Complexity of Subsets
Subsets with Duplicates
Optimizing Duplicates
Bits for Subsets
Generate Subsets with Bits
Bitwise Complexity
Subsets of a String
K-Sized Subsets
Advanced Linked Lists: Reordering and Merging
Odd-Even List Reorder
Reorder List: Half-Reverse
Partition List Around Value
Merge Two Sorted Lists
Merge K Lists: Pairwise
Merge K Lists: Priority Queue
Remove Nth Node from End
Swap Nodes in Pairs
Rotate List by K Places
Advanced Stacks and Queues: Monotonic Stacks/Queues
What's a Monotonic Stack?
Building a Monotonic Stack
Next Greater Element I
Next Greater Element II
Largest Rectangle in Histogram
Trapping Rain Water
What's a Monotonic Queue?
Building a Monotonic Queue
Sliding Window Max/Min
Subarray with K Distinct
Advanced Trees: Lowest Common Ancestor (LCA)
What's an LCA?
LCA in a Binary Tree
LCA Iteratively
LCA in a BST
BST LCA: Recursive
BST LCA: Iterative
LCA Complexity Analysis
LCA with Parent Pointers
Advanced Trees: Tree Serialization and Deserialization
Why Serialize Trees?
Serialization Basics
Preorder Serialization
Deserializing Preorder
Level Order Serialization
Deserializing Level Order
Space & Time Complexity
Choosing the Right Method
Advanced Graphs: Topological Sort
What is Topological Sort?
DAGs: The Prerequisite
Kahn's Algorithm: Intuition
Implementing Kahn's Algorithm
Detecting Cycles with Kahn's
DFS Topo Sort: The Idea
Implementing DFS Topo Sort
DFS Cycle Detection
Task Scheduling
Course Prerequisites
Build Order & Dependencies
Kahn's vs. DFS Topo Sort
Multiple Topological Orders
Advanced Graphs: Cycle Detection
What's a Graph Cycle?
DFS for Undirected Cycles
DSU for Undirected Cycles
Redundant Connections
DFS for Directed Cycles
Topological Sort & Cycles
Cycles: Good or Bad?
Course Schedule Problem
Advanced Graphs: Bipartite Graphs
What's a Bipartite Graph?
Coloring Graphs
BFS for Bipartite Check
DFS for Bipartite Check
Complexity of Bipartite Check
Two-Coloring Problems
Is Graph Bipartite?
Advanced Dynamic Programming: State Space Reduction
Why Optimize Space?
Spotting Redundant States
Intro to Rolling Arrays
Unique Paths: Space Opt.
Unique Paths II: Obstacles
Min Cost Climbing Stairs
House Robber: Space Opt.
Longest Common Subsequence
Knapsack: Space Optimized
Trade-offs & Best Practices
Advanced Dynamic Programming: Interval DP
What is Interval DP?
Interval DP Structure
Matrix Chain Multiply
Burst Balloons (Conceptual)
Optimal Binary Search Tree
Boolean Parenthesization
Recognizing Interval DP
Complexity Analysis
Advanced Dynamic Programming: Digit DP
What is Digit DP?
Digit DP vs. Brute Force
The Recursive Structure
Memoization in Digit DP
Handling 'Tight' Constraint
Managing Leading Zeros
Count Numbers with Digit D
Sum of Digits in Range
Complexity Analysis of Digit DP
Digit DP Problem Variations
Advanced Greedy Algorithms: Proofs and Edge Cases
Greedy Choice Property
Optimal Substructure
Exchange Argument Proofs
Proof by Contradiction
Activity Selection Proof
When Greedy Fails
Coin Change: Greedy vs DP
Handling Complex Constraints
Greedy vs. DP: Knapsack
Problem Classification
Advanced Bit Manipulation: Subset Sum and XOR Properties
Subsets with Bitmasks
Subset Sum Problem Intro
XOR for Unique Numbers
Two Unique Numbers
XOR for Missing Number
Bitmask DP Intro
Traveling Salesperson (DP)
Assignment Problem (DP)
Fast Bit Counting
Power of Two Check
Bitwise Swapping
Mathematical Concepts for DSA: Number Theory Basics
Divisibility & Remainders
Prime Numbers: The Basics
Primality Test: Naive
Primality Test: Optimized
Factors and Divisors
Prime Factorization
GCD: Euclidean Algorithm
LCM: Least Common Multiple
Sieve of Eratosthenes
Modular Arithmetic Intro
Modular Exponentiation
Mathematical Concepts for DSA: Combinatorics and Probability
What's a Factorial?
The Fundamental Rule
Arranging All Items
Picking & Arranging
Repeated Items?
Choosing Items (nCk)
Combinations in Action
Intro to Probability
Probability Rules
Counting for Complexity
Average Case Analysis
Advanced Data Structures: Segment Trees (Conceptual)
Why Segment Trees?
Segment Tree Structure
Building a Segment Tree
Range Query Concept
Point Update Concept
Complexity of Operations
When to Use Segment Trees
Advanced Data Structures: Fenwick Trees (BIT) (Conceptual)
Why Fenwick Trees?
BIT: The Core Idea
Building a Fenwick Tree
Point Update: How it Works
Prefix Sum Query
Range Sum Queries
BIT Complexity Analysis
BIT vs. Segment Tree
When to Use a Fenwick Tree
Advanced Data Structures: Suffix Arrays/Trees (Conceptual)
Why Suffix Structures?
What's a Suffix Array?
What's a Suffix Tree?
Suffix Array: Construction
Suffix Array: Applications
Suffix Array: Complexity
Suffix Tree: Construction
Suffix Tree: Applications
Suffix Tree: Complexity
SA vs. ST: When to Use?
Real-World Use Cases
System Design Fundamentals for Coding Interviews
Why System Design?
The Design Process
Clients & Servers
Load Balancers
Databases: SQL vs NoSQL
Caches: Speeding Things Up
Message Queues
Scalability & Reliability
Consistency & Availability
APIs & Microservices
Design a URL Shortener
Design a Chat App (Basics)
Design a Rate Limiter
Concurrency and Multithreading in Java for Interviews
Why Concurrency Matters
Threads vs. Processes
Creating Java Threads
Thread Lifecycle & States
Shared Resources & Issues
The `synchronized` Keyword
Volatile & Atomic Variables
Locks: The `Lock` Interface
Deadlocks & Prevention
Wait, Notify, NotifyAll
Producer-Consumer Problem
Executors & Thread Pools
Dining Philosophers (Conc.)
Object-Oriented Design (OOD) for Interviews
What is OOD?
Classes, Objects, & More
UML Basics for OOD
Single Responsibility
Open/Closed Principle
Liskov Substitution
Interface Segregation
Dependency Inversion
Design a Deck of Cards
Design a Parking Lot
Design a Chess Game
Design a Vending Machine
OOD Communication Skills
Mock Interview Practice: Round 1
Mock Interview Prep
The Interviewer's Role
Problem Solving: Attempt 1
Self-Reflection & Analysis
Feedback: Problem 1
Refining Your Solution
Problem Solving: Attempt 2
Feedback & Growth Plan
Mock Interview Practice: Round 2
Problem: Medium-Hard DSA
Strategy: Beyond Brute Force
Asking Smart Questions
Integrating Feedback
Clean Code, Fast
Debugging Live
Deep Dive: Time Complexity
Deep Dive: Space Complexity
Trade-offs & Justification
Mock Interview Practice: Round 3
The Final Challenge
Complex Coding Problem
System Design Deep Dive
Behavioral Mastery
Communication Under Fire
Post-Interview Reflection
Career Guidance and Next Steps
Coding Interview Prep
System Design Interview
Behavioral Interview Prep
Crafting Your Resume
LinkedIn & Networking
Portfolio & Projects
Staying Updated with DSA
Tech Trends & Skills
Setting Career Goals
Building Your Action Plan