Divide and Conquer Algorithm Visualizer
An interactive web application that visualizes Divide and Conquer algorithms with step-by-step animations and time complexity analysis. The project helps students understand how problems are divided into smaller subproblems, solved recursively, and combined to produce the final result.
Features
- Step-by-step visualization of the algorithm
- Clear explanation of Divide, Conquer, and Combine phases
- Time complexity analysis using recurrence relations
- Clean and user-friendly interface
- Interactive learning for algorithm understanding
Algorithm Implemented
This project demonstrates one Divide and Conquer algorithm such as:
- Merge Sort
- Quick Sort
- Strassen’s Matrix Multiplication
- Closest Pair of Points
- Convex Hull
- Largest Subarray Sum
How Divide and Conquer Works
Divide and Conquer is a strategy that solves a problem in three steps:
- Divide – Break the problem into smaller subproblems.
- Conquer – Solve each subproblem recursively.
- Combine – Merge the results of the subproblems to form the final solution.
Time Complexity Analysis
The time complexity of Divide and Conquer algorithms is often represented using a recurrence relation:
T(n) = aT(n/b) + f(n)
Where: a = number of subproblems n/b = size of each subproblem f(n) = cost of dividing and combining
Tech Stack
- HTML
- CSS
- JavaScript
- Visualization techniques for algorithm animation
Project Structure
dc-visualizer ─ index.html ─ style.css ─ script.js ─ README.md
How to Run the Project
- Clone the repository git clone https://github.com/arpit-rath/Divide-Conquer-Algorithm-Visualizer.git
- Open the project folder.
- Run index.html in your browser.
Learning Purpose This project is designed to help students studying Algorithms and Data Structures better understand Divide and Conquer techniques through visualization and interactive learning