1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-11-09 22:08:58 +01:00
programming-challenges/challenges/heap-algorithm/README.md

37 lines
518 B
Markdown
Raw Normal View History

2021-11-08 16:56:22 +01:00
# heap-algorithm
2023-07-02 17:28:54 +02:00
Created by [@theoludwig](https://github.com/theoludwig) on 8 November 2021.
2021-11-08 16:56:22 +01:00
## Instructions
Write a program that generates all possible unique permutations of a string.
The order of the generated permutations is important, see the example below.
2021-11-08 16:56:22 +01:00
## Source
2023-08-21 23:11:08 +02:00
[Heap's Algorithm - Wikipedia](https://en.wikipedia.org/wiki/Heap%27s_algorithm)
2021-11-08 16:56:22 +01:00
## Examples
### Example 1
#### Input
```txt
abc
```
#### Output
```txt
abc
bac
cab
acb
bca
cba
2021-11-08 16:56:22 +01:00
```
See the `test` folder for examples of input/output.