1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-07-18 02:20:12 +02:00
programming-challenges/challenges/heap-algorithm
2023-08-21 23:11:08 +02:00
..
solutions fix(solutions): fix: more memory issues thanks to -fsanitize=address flag with gcc 2023-08-21 21:37:54 +02:00
test fix(solutions): fix: more memory issues thanks to -fsanitize=address flag with gcc 2023-08-21 21:37:54 +02:00
README.md feat(challenges): add single-number 2023-08-21 23:11:08 +02:00

heap-algorithm

Created by @theoludwig on 8 November 2021.

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.

Source

Heap's Algorithm - Wikipedia

Examples

Example 1

Input

abc

Output

abc
bac
cab
acb
bca
cba

See the test folder for examples of input/output.