3. Describe an algorithm by using stacks and/or queues to enumerate all permutations of the elements in a set. You need
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. Describe an algorithm by using stacks and/or queues to enumerate all permutations of the elements in a set. You need
question. Example: input: {a, b, c}, output: a, b, c; a, c, b; b, a, c; b, c, a; c, a, b; c, b, a
3. Describe an algorithm by using stacks and/or queues to enumerate all permutations of the elements in a set. You need to decide which data structure(s) is/are suitable. You cannot use any recursive functions for this