{menu}{mirror}



Fundamental Algorithm Analysis

Head Permutations Using a Linear Array of 3 Numbers
EXAMPLE_01 Output where N = 3

Sequence

Output

Indexes Swapped

1

1 2 3

No Swap

2

2 1 3

swapped(0, 1)

3

3 1 2

swapped(0, 2)

4

1 3 2

swapped(0, 1)

5

2 3 1

swapped(0, 2)

6

3 2 1

swapped(0, 1)


Click here to return to EXAMPLE_01.





[New Book: Scalable Permutations]

[QuickPerm] | [EXAMPLE 02] | [EXAMPLE 03] | [EXAMPLE 04] | [MetaPerm]
[Download the Five C++ Examples] | [Permutation Exercises]
[Contact the Author] | [Make a Donation] | [Links]
[HOME]

Help keep public education alive! We need your donations, click here to help now...

{top}

Copyright © 2020 by Phillip Paul Fuchs, all rights reserved. Valid XHTML 1.1 Strict Valid CSS!
Abstracting with credit is permitted...