Skip to content

Commit 7b8ab76

Browse files
committed
Init
1 parent 4149e4b commit 7b8ab76

File tree

4,261 files changed

+1111108
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,261 files changed

+1111108
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# 🛤️ Unique Paths II Visualizer
2+
3+
An interactive web application that visualizes the **Unique Paths II** dynamic programming problem with obstacle support.
4+
5+
## ✨ Features
6+
7+
- **🖱️ Click & Drag**: Paint obstacles by clicking and dragging across the grid
8+
- **🎬 Path Animation**: Watch random valid paths being traced step-by-step
9+
- **📊 DP Values**: Toggle display of dynamic programming computation values
10+
- **📱 Responsive Design**: Works on desktop and mobile devices
11+
- **⚡ Real-time Updates**: Instant recalculation as you modify the grid
12+
13+
## 🚀 Demo
14+
15+
Visit the live demo: [https://GreenMarioh.github.io/unique-paths-visualizer/](https://GreenMarioh.github.io/unique-paths-visualizer/)
16+
17+
## 🎮 How to Use
18+
19+
1. **Grid Setup**: Adjust rows and columns using the input fields
20+
2. **Add Obstacles**: Click and drag to paint red obstacle cells
21+
3. **Remove Obstacles**: Drag over existing obstacles to erase them
22+
4. **Animate Path**: Click "Show Random Path" to see a path traced with smooth animation
23+
5. **View DP Values**: Toggle "Show Path Counts" to see the computed values
24+
25+
## 🧮 Algorithm
26+
27+
This visualizer demonstrates the **Unique Paths II** problem:
28+
29+
- **Input**: An `m × n` grid with obstacles
30+
- **Goal**: Count unique paths from top-left to bottom-right
31+
- **Constraints**: Can only move right or down, obstacles block paths
32+
- **Solution**: Dynamic programming with obstacle handling
33+
34+
## 🛠️ Technical Details
35+
36+
- **Frontend**: React with Hooks
37+
- **Styling**: Tailwind CSS
38+
- **Animations**: CSS transitions with JavaScript timing
39+
- **Deployment**: GitHub Pages
40+
41+
## 📜 License
42+
43+
MIT License - feel free to use this code for educational purposes.
44+
45+
---
46+
47+
_Enhanced visualization of classic dynamic programming concept._

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Unique Paths Visualizer</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

node_modules/.bin/autoprefixer

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/autoprefixer.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/autoprefixer.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/browserslist

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/browserslist.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/browserslist.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/cssesc

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/cssesc.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)