Useful Links
Computer Science
Algorithms and Data Structures
Algorithms
1. Introduction to Algorithms
2. Data Structures
3. Algorithmic Design Paradigms
4. Sorting and Searching Algorithms
5. Graph Algorithms
6. Advanced Algorithm Topics
7. Complexity Theory
Graph Algorithms
Graph Traversal Algorithms
Breadth-First Search
Algorithm Description
Queue-Based Implementation
Implementation Details
Visited Array
Queue Operations
Level Tracking
Time Complexity Analysis
Space Complexity Analysis
Applications
Shortest Path in Unweighted Graphs
Level-Order Traversal
Connected Components
Bipartite Graph Testing
Variants
Multi-Source BFS
Bidirectional BFS
Depth-First Search
Algorithm Description
Implementation Approaches
Recursive Implementation
Iterative Implementation with Stack
DFS Tree
Tree Edges
Back Edges
Forward Edges
Cross Edges
Time Complexity Analysis
Space Complexity Analysis
Applications
Cycle Detection
Undirected Graphs
Directed Graphs
Topological Sorting
Algorithm Description
Connected Components
Undirected Graphs
Strongly Connected Components
Path Finding
Maze Solving
DFS Variants
Iterative Deepening
Limited Depth Search
Minimum Spanning Trees
MST Problem Definition
MST Properties
Cut Property
Cycle Property
Uniqueness Conditions
Kruskal's Algorithm
Algorithm Description
Greedy Strategy
Disjoint Set Data Structure
Union-Find Operations
Path Compression
Union by Rank
Implementation
Time Complexity Analysis
Space Complexity
Correctness Proof
Prim's Algorithm
Algorithm Description
Greedy Strategy
Priority Queue Implementation
Min-Heap Usage
Key Updates
Implementation Variants
Dense Graph Implementation
Sparse Graph Implementation
Time Complexity Analysis
Space Complexity
Correctness Proof
Comparison of MST Algorithms
Time Complexity
Space Complexity
Implementation Complexity
Practical Considerations
Applications
Network Design
Clustering
Approximation Algorithms
Shortest Path Algorithms
Single-Source Shortest Paths
Problem Definition
Shortest Path Properties
Optimal Substructure
Triangle Inequality
Dijkstra's Algorithm
Algorithm Description
Greedy Strategy
Priority Queue Implementation
Min-Heap Operations
Decrease-Key Operation
Implementation Details
Time Complexity Analysis
Space Complexity
Limitations
Non-Negative Weights Requirement
Correctness Proof
Variants
Single-Target Shortest Path
All-Pairs with Multiple Runs
Bellman-Ford Algorithm
Algorithm Description
Dynamic Programming Approach
Relaxation Process
Implementation
Time Complexity Analysis
Space Complexity
Handling Negative Weights
Negative Cycle Detection
Detection Method
Reporting Negative Cycles
Correctness Proof
Applications
Currency Arbitrage
Network Routing
All-Pairs Shortest Paths
Problem Definition
Floyd-Warshall Algorithm
Algorithm Description
Dynamic Programming Approach
Three-Dimensional DP Table
Implementation
Time Complexity Analysis
Space Complexity
Path Reconstruction
Handling Negative Cycles
Applications
Transitive Closure
Graph Diameter
Johnson's Algorithm
Algorithm Description
Reweighting Technique
Bellman-Ford Preprocessing
Multiple Dijkstra Runs
Implementation
Time Complexity Analysis
Use Cases
Sparse Graphs
Comparison with Floyd-Warshall
Shortest Path Variants
Single-Pair Shortest Path
k-Shortest Paths
Shortest Path with Constraints
Network Flow Algorithms
Flow Network Concepts
Flow Network Definition
Source and Sink
Capacity Constraints
Flow Conservation
Net Flow
Maximum Flow Problem
Problem Definition
Flow Properties
Residual Networks
Residual Capacity
Augmenting Paths
Ford-Fulkerson Method
Algorithm Framework
Augmenting Path Strategy
Implementation Approaches
Termination Conditions
Time Complexity Analysis
Edmonds-Karp Algorithm
BFS-Based Path Finding
Implementation
Time Complexity Improvement
Push-Relabel Algorithms
Preflow Concept
Height Functions
Push and Relabel Operations
Max-Flow Min-Cut Theorem
Statement
Proof Outline
Applications
Network Reliability
Image Segmentation
Minimum Cost Flow
Problem Definition
Cost-Augmenting Paths
Successive Shortest Path Algorithm
Applications
Bipartite Matching
Edge Connectivity
Vertex Connectivity
Project Selection
Previous
4. Sorting and Searching Algorithms
Go to top
Next
6. Advanced Algorithm Topics