Skip to content

arpit-rath/Divide-Conquer-Algorithm-Visualizer

Repository files navigation

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

  1. Step-by-step visualization of the algorithm
  2. Clear explanation of Divide, Conquer, and Combine phases
  3. Time complexity analysis using recurrence relations
  4. Clean and user-friendly interface
  5. Interactive learning for algorithm understanding

Algorithm Implemented

This project demonstrates one Divide and Conquer algorithm such as:

  1. Merge Sort
  2. Quick Sort
  3. Strassen’s Matrix Multiplication
  4. Closest Pair of Points
  5. Convex Hull
  6. Largest Subarray Sum

How Divide and Conquer Works

Divide and Conquer is a strategy that solves a problem in three steps:

  1. Divide – Break the problem into smaller subproblems.
  2. Conquer – Solve each subproblem recursively.
  3. 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

  1. HTML
  2. CSS
  3. JavaScript
  4. Visualization techniques for algorithm animation

Project Structure

dc-visualizer ─ index.html ─ style.css ─ script.js ─ README.md

How to Run the Project

  1. Clone the repository git clone https://github.com/arpit-rath/Divide-Conquer-Algorithm-Visualizer.git
  2. Open the project folder.
  3. 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

About

It is an interactive tool that visualizes Divide and Conquer algorithms with step-by-step animations. It demonstrates the divide, conquer and combine phases along with time complexity analysis using recurrence relations, presented through a clean and user-friendly interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors