https://github.com/matteopolak/algorithms
A collection of common algorithms implemented in C++.
https://github.com/matteopolak/algorithms
algorithms astar cpp
Last synced: 6 months ago
JSON representation
A collection of common algorithms implemented in C++.
- Host: GitHub
- URL: https://github.com/matteopolak/algorithms
- Owner: matteopolak
- License: mit
- Created: 2022-11-20T19:07:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T16:47:29.000Z (about 3 years ago)
- Last Synced: 2025-02-16T18:46:39.358Z (10 months ago)
- Topics: algorithms, astar, cpp
- Language: C++
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Common Algorithms

[](https://opensource.org/licenses/MIT)
This repository contains a collection of common algorithms implemented in C++.
## Input format for `astar`
```bash
gcc *.cpp -lstdc++ -o astar.exe
```
Mazes have the following characters:
| Char | Meaning |
| ---- | ------------------------------- |
| `#` | Wall |
| `.` | Path |
| `S` | Start |
| `G` | Goal (you can specify multiple) |
The output will provide the input maze with `*` characters denoting
the shortest path from `S` to any `G`.
For the following maze:
```cmd
#######
S..####
##.##.G
...#..#
.#...##
```
The output will be:
```cmd
#######
***####
##*##**
..*#**#
.#***##
```