Skip to content

feat: Add Dijkstra's algorithm visualization #23#27

Open
Zaki-Mohd wants to merge 1 commit into
masabinhok:mainfrom
Zaki-Mohd:feature/dijkstra-visualization
Open

feat: Add Dijkstra's algorithm visualization #23#27
Zaki-Mohd wants to merge 1 commit into
masabinhok:mainfrom
Zaki-Mohd:feature/dijkstra-visualization

Conversation

@Zaki-Mohd

Copy link
Copy Markdown

📝 Description

closes #23
This PR introduces a new visualization for Dijkstra's algorithm, a fundamental algorithm for finding the shortest paths between nodes in a graph.

The implementation follows the project's established structure for adding new algorithms, as outlined in docs/ADDING_ALGORITHMS.md.

This includes:

  • The core algorithm logic and step generation in app/algorithms/dijkstra.ts.
  • The corresponding visualization page at app/algorithm/dijkstra/page.tsx.
  • Updates to constants/algorithms.ts to include the new algorithm in the UI.

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 UI/UX improvement
  • ♻️ Code refactoring
  • ⚡ Performance improvement
  • 🧪 Test addition or update
  • 🔧 Configuration change
  • 🤖 CI/CD update

🧪 Testing

  • I have tested this code locally
  • All existing tests pass
  • I have added new tests (if applicable)
  • The build completes successfully
  • I have tested on multiple browsers/devices (if UI change)

Test Steps:

  1. Navigate to the new Dijkstra's algorithm visualization page.
  2. Observe the default graph visualization.
  3. Use the controls to step through the algorithm and see the visualization update.
  4. Enter a new valid graph structure and initialize the algorithm to see it adapt.

📸 Screenshots / Demo

image

After:
A running demo of the Dijkstra algorithm visualization.

✅ Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have checked my code and corrected any misspellings
  • My commit messages follow the Conventional Commits specification
  • I have read the Contributing Guidelines

🔗 Related Issues

Related to #23

@Zaki-Mohd Zaki-Mohd requested a review from masabinhok as a code owner October 27, 2025 16:17
@vercel

vercel Bot commented Oct 27, 2025

Copy link
Copy Markdown

@Zaki-Mohd is attempting to deploy a commit to the Sabin Shrestha's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Congratulations on your first Pull Request to Vizit!

Thank you for taking the time to contribute! 🙌 We really appreciate it.

What happens next?

  • 🤖 Automated checks will run (linting, build, type-check)
  • 👀 A maintainer will review your code
  • 💬 We might ask for some changes or clarifications
  • ✅ Once approved, your PR will be merged!

While you wait:

  • Make sure all CI checks pass ✅
  • Review our Contributing Guide if you haven't already
  • Check that your PR description clearly explains the changes

Thanks again for contributing to making algorithm visualization better for everyone! 💙


🎃 Hacktoberfest participants: Make sure your PR follows our quality guidelines to be counted!

@Zaki-Mohd Zaki-Mohd closed this Oct 27, 2025
@Zaki-Mohd Zaki-Mohd reopened this Oct 27, 2025
@Zaki-Mohd

Copy link
Copy Markdown
Author

@masabinhok May i know what's the actual issue? i see some merge sort issue?

@masabinhok masabinhok left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have some lint errors to fix

@masabinhok

Copy link
Copy Markdown
Owner

@masabinhok May i know what's the actual issue? i see some merge sort issue?

ignore the merge-sort one,
image
In the code, you’ve used the type any. Please define a proper type instead, as using any is not considered good practice.

@Zaki-Mohd

Copy link
Copy Markdown
Author

i'm getting Lint issues in merge-sort.ts, do i need to resolve those as well? @masabinhok

@masabinhok

Copy link
Copy Markdown
Owner

i'm getting Lint issues in merge-sort.ts, do i need to resolve those as well? @masabinhok

not necessarily, but if you wish to you can, you can just remove the unused var as it states.

@masabinhok

Copy link
Copy Markdown
Owner

@Zaki-Mohd Hey, i have fixed the merge-sort issues, you can focus on yours only!

@masabinhok masabinhok changed the title feat: Add Dijkstra's algorithm visualization feat: Add Dijkstra's algorithm visualization #23 Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Djikstra

2 participants