-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
🚀 Feature Request
Please add an implementation of Dijkstra’s shortest path algorithm in Python to this repository.
🔍 Why this is useful
- Dijkstra’s algorithm is a well-known graph algorithm and a useful example for learners.
- Having it in Python increases the variety of languages supported in this repo.
- Contributors can refer to it and extend with weighted graphs, test cases, etc.
📦 What to include
- A file
python/dijkstra.py(or under appropriate “Python” directory) with a clean, readable implementation. - Optionally, a README or comment block explaining usage (input format, how to call it, complexity).
- A simple example/test case inside the same file or separate
test_dijkstra.pyor example in comments. - (Optional) Add entry in
README.mdlisting “Python: dijkstra.py” under Python section or code index.
✅ Acceptance Criteria
- The algorithm handles graphs represented via adjacency lists or dictionaries.
- Works for non-negative weights.
- Example usage is documented.
- Code is clean, commented.
- Doesn’t break any existing contributions or project structure.
If maintainers are okay with this, I’ll prepare a PR with the implementation.
Metadata
Metadata
Assignees
Labels
No labels