All permutations

Line up three cards. How many different rows can you make if you use all three every time?

Pick a card for the first open slot. Explore the remaining slots, return the card, and try the next candidate.

There are n choices for the first slot and n − 1 for the second. This gives n! permutations. Original indices distinguish equal cards.

Writing every row takes O(n·n!) time. Try up to six cards in the player for up to 720 rows.