Skip to content

Commit 4648db9

Browse files
authored
Update README.md
1 parent 956c1be commit 4648db9

File tree

1 file changed

+199
-1
lines changed

1 file changed

+199
-1
lines changed

README.md

Lines changed: 199 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,199 @@
1-
# dijkstra-algorithm
1+
<a name="readme-top"></a>
2+
3+
4+
<p align="center">
5+
<a href="https://github.com/codeesura/dijkstra-algorithm/graphs/contributors">
6+
<img src="https://img.shields.io/github/contributors/codeesura/dijkstra-algorithm.svg?style=for-the-badge" alt="Contributors">
7+
</a>
8+
9+
<a href="https://github.com/codeesura/dijkstra-algorithm/network/members">
10+
<img src="https://img.shields.io/github/forks/codeesura/dijkstra-algorithm.svg?style=for-the-badge" alt="Forks">
11+
</a>
12+
13+
<a href="https://github.com/codeesura/dijkstra-algorithm/stargazers">
14+
<img src="https://img.shields.io/github/stars/codeesura/dijkstra-algorithm.svg?style=for-the-badge" alt="Stars">
15+
</a>
16+
17+
<a href="https://github.com/codeesura/dijkstra-algorithm/issues">
18+
<img src="https://img.shields.io/github/issues/codeesura/dijkstra-algorithm.svg?style=for-the-badge" alt="Issues">
19+
</a>
20+
21+
<a href="https://github.com/codeesura/dijkstra-algorithm/blob/master/LICENSE">
22+
<img src="https://img.shields.io/github/license/codeesura/dijkstra-algorithm.svg?style=for-the-badge" alt="MIT License">
23+
</a>
24+
</p>
25+
26+
27+
28+
<!-- PROJECT LOGO -->
29+
<br />
30+
<div align="center">
31+
<a href="https://github.com/othneildrew/Best-README-Template">
32+
<img src="images/logo.png" alt="Logo" width="80" height="80">
33+
</a>
34+
35+
<h3 align="center">Dijkstra Algorithm Implementation</h3>
36+
37+
<p align="center">
38+
A robust and efficient JavaScript implementation of the Dijkstra Algorithm to solve the shortest path problem in graph data structures.
39+
<br />
40+
<a href="https://github.com/codeesura/dijkstra-algorithm">View Demo</a>
41+
·
42+
<a href="https://github.com/codeesura/dijkstra-algorithm/issues">Report Bug</a>
43+
·
44+
<a href="https://github.com/codeesura/dijkstra-algorithm/issues">Request Feature</a>
45+
</p>
46+
</div>
47+
48+
<!-- TABLE OF CONTENTS -->
49+
<details>
50+
<summary>Table of Contents</summary>
51+
<ol>
52+
<li>
53+
<a href="#dijkstra-algorithm">About The Project</a>
54+
</li>
55+
<li>
56+
<a href="#getting-started">Getting Started</a>
57+
<ul>
58+
<li><a href="#prerequisites">Prerequisites</a></li>
59+
<li><a href="#installation">Installation</a></li>
60+
</ul>
61+
</li>
62+
<li><a href="#usage">Usage</a></li>
63+
<li><a href="#roadmap">Roadmap</a></li>
64+
<li><a href="#contributing">Contributing</a></li>
65+
<li><a href="#license">License</a></li>
66+
<li><a href="#contact">Contact</a></li>
67+
<li><a href="#acknowledgments">Acknowledgments</a></li>
68+
</ol>
69+
</details>
70+
71+
## Dijkstra Algorithm
72+
73+
This project introduces a highly efficient JavaScript implementation of the renowned Dijkstra's algorithm, wrapped in a user-friendly PriorityQueue class. It's designed for those who need to find the shortest path in complex network graphs, like the ones commonly found in routing and navigation problems or network flow optimization.
74+
75+
Here's why this project stands out:
76+
* **Time-Efficiency:** You can integrate this into your systems to solve shortest-path problems with blazing speed.
77+
* **Ease of Use:** The `PriorityQueue` class abstracts the complexity of the algorithm, providing a clean and simple interface for users to implement in their projects.
78+
* **DRY Code:** Why reinvent the wheel? The modular design follows the DRY (Don't Repeat Yourself) principle, making your coding process more efficient.
79+
80+
This template is not just a mere set of functions; it's a comprehensive solution for those looking to enhance their applications with optimal pathfinding capabilities. The project is open for contributions, and suggestions for improvements are always welcome. Whether you're dealing with financial networks, social networks, or logistical maps, this algorithm is versatile enough to cater to a wide array of applications.
81+
82+
Use this template to jump-start your project, and never worry about the underlying complexities of graph-based problem solving again.
83+
84+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
85+
86+
<!-- GETTING STARTED -->
87+
## Getting Started
88+
89+
To set up this project locally, follow these simple steps.
90+
91+
### Prerequisites
92+
93+
This project uses bun for dependency management. Make sure you have bun installed on your system.
94+
95+
* bun
96+
```sh
97+
curl -fsSL https://bun.sh/install | bash
98+
```
99+
100+
### Installation
101+
102+
1. Clone the repo
103+
```sh
104+
git clone https://github.com/codeesura/dijkstra-algorithm.git
105+
```
106+
2. Install bun packages
107+
```sh
108+
bun install
109+
```
110+
111+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
112+
113+
<!-- USAGE EXAMPLES -->
114+
## Usage
115+
116+
The `main.js` file includes a PriorityQueue class and an implementation of Dijkstra's algorithm. Here's how you can use it in your project:
117+
118+
### PriorityQueue Example
119+
```javascript
120+
let pq = new PriorityQueue();
121+
pq.enqueue("Item1", 1);
122+
pq.enqueue("Item2", 2);
123+
let item = pq.dequeue(); // Returns "Item1"
124+
```
125+
126+
### Dijkstra's Algorithm Example
127+
128+
```javascript
129+
let graph = {
130+
start: { A: 6, B: 2 },
131+
A: { finish: 1 },
132+
B: { A: 3, finish: 5 },
133+
finish: {}
134+
};
135+
136+
let costs = dijkstra(graph);
137+
```
138+
139+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
140+
141+
<!-- ROADMAP -->
142+
## Roadmap
143+
144+
- [x] Implement PriorityQueue class.
145+
- [x] Implement Dijkstra's algorithm.
146+
- [ ] Add additional examples and more complex use cases in documentation.
147+
- [ ] Create an extended guide for different scenarios where Dijkstra's algorithm can be applied.
148+
- [ ] Implement additional graph algorithms and data structures for broader utility.
149+
150+
Check the [open issues](https://github.com/codeesura/dijkstra-algorithm/issues) for a list of proposed features (and known issues).
151+
152+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
153+
154+
<!-- CONTRIBUTING -->
155+
## Contributing
156+
157+
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make to the PriorityQueue and Dijkstra's algorithm implementation are **greatly appreciated**.
158+
159+
If you have a suggestion that would make this better, please fork the repository and create a pull request or open an issue with the tag "enhancement". Don't forget to give the project a star if you find it helpful! Thank you for your support!
160+
161+
1. Fork the Project
162+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
163+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
164+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
165+
5. Open a Pull Request
166+
167+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
168+
169+
<!-- LICENSE -->
170+
## License
171+
172+
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
173+
174+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
175+
176+
177+
<!-- CONTACT -->
178+
## Contact
179+
180+
codeesura - [@codeesura](https://twitter.com/codeesura) - codeesura@gmail.com
181+
182+
Project Link: [https://github.com/codeesura/dijkstra-algorithm](https://github.com/codeesura/dijkstra-algorithm)
183+
184+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
185+
186+
<!-- ACKNOWLEDGMENTS -->
187+
## Acknowledgments
188+
189+
This project wouldn't be possible without the extensive resources available for understanding and implementing Dijkstra's algorithm. We'd like to acknowledge the following:
190+
191+
* [Wikipedia's Dijkstra's Algorithm Page](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm) - For providing a detailed explanation of the algorithm and its complexity, which is fundamental to any implementation.
192+
* [GeeksforGeeks Dijkstra's Algorithm Guide](https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/) - For offering step-by-step tutorials and examples that were instrumental in understanding the practical aspects of the algorithm.
193+
* [Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein](https://mitpress.mit.edu/books/introduction-algorithms-third-edition) - For providing a comprehensive guide to algorithms, which is an essential resource for computer science students and professionals alike.
194+
* [Visualgo.net](https://visualgo.net/en/sssp) - For offering interactive animations of various algorithms, including Dijkstra's, which greatly aids in visualizing the algorithm's step-by-step execution.
195+
* [The Algorithm Design Manual by Steven S. Skiena](https://www.algorist.com/) - For being a practical reference with a rich set of problems and solutions, helping to contextualize Dijkstra's algorithm in real-world applications.
196+
197+
These resources have contributed significantly to the development of the Dijkstra's algorithm implementation in our project and are highly recommended for anyone looking to deepen their understanding of graph algorithms.
198+
199+
<p align="right">(<a href="#readme-top">back to top</a>)</p>

0 commit comments

Comments
 (0)