Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🪙 Coin Change Dynamic Programming Visualizer

An interactive web-based visualization of the Coin Change Problem using the Bottom-Up Dynamic Programming approach. This project helps to understand how the DP table is built step by step while computing the total number of ways to make a target amount using any number of given coin denominations.

📚 Developed as a Design & Analysis of Algorithms (DAA) course project.


🚀 Features

  • Interactive Coin Change Problem Solver
  • Bottom-Up Dynamic Programming Implementation
  • Step-by-Step DP Table Visualization
  • Automatic DP Table Generation
  • DP Recurrence Explanation
  • All Valid Coin Combinations
  • Complexity Analysis
  • Pseudocode Display
  • Input Validation
  • Responsive Modern UI

🧠 Problem Statement

Given an array of coin denominations and a target amount V, determine the total number of distinct ways to make exactly V using unlimited coins of each denomination.

Example:

Coins:

1, 2, 3

Target:

4

Output:

4 Ways

The valid combinations are:

  • 1 + 1 + 1 + 1
  • 1 + 1 + 2
  • 2 + 2
  • 1 + 3

💡 Dynamic Programming Approach

The project uses **Tabulation (Bottom Up DP) **.

⚙️ Time and Space Complexity

Complexity Value
Time O(n × V)
Space O(n × V)

where

  • n = number of coin denominations
  • V = target amount

🛠️ Technologies Used

  • HTML5
  • CSS3
  • Vanilla Javascript
  • Dynamic Programming (DP)

🎮 How to Use

  1. Enter coin denominations separated by commas.

Example:

1,2,5
  1. Enter the target amount.

  2. Click Run.

  3. Explore

  • DP Table
  • Step Mode
  • Animation
  • Combinations
  • Complexity Analysis

📚 Learning Outcomes

This project helps understand:

  • Dynamic Programming
  • Tabulation
  • Optimal Substructure
  • DP Table Construction
  • Algorithm Visualization
  • Time & Space Complexity Analysis

👨‍💻 Author

Aftab Ahmed Khan

Computer Science Engineering Student at NITP

GitHub: https://github.com/AftabAhmedKhan183


⭐ If you like this project

Give this repository a ⭐ on GitHub!

It motivates me to build more educational algorithm visualizers.


📄 License

This project is developed for educational purposes under the MIT License.

About

Interactive Coin Change Problem Visualizer following Bottom-Up DP . Features Step-by-Step DP table , recurrence relation, valid combinations , pseudo code and complexity analysis . Responsive and Interactive UI built using HTML , CSS and JS

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages