Skip to content
UniKit

List permutations

Treat every line as an element and list all of its permutations (order matters) — all n items by default, or P(n,r) when a length is given. Input is capped at 12 items and output at 20,000 permutations.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

List (one item per line, 12 items max)

Permutations

One permutation per line, 20,000 lines max.

Paste a list to list every permutation

Items: 0 · Permutations: 0 · Items per line: 0 · Result limit: 0

What this tool does

  • Sequencing: list every possible order of a few tasks and pick the feasible ones by hand.
  • Exhaustive checking: enumerate all permutations of a small input to verify an algorithm's output.
  • Seating or rotation plans: list every arrangement of a short roster and filter by your constraints.

Example

Input

apple
banana
cherry

Output

applebananacherry
applecherrybanana
bananaapplecherry
bananacherryapple
cherryapplebanana
cherrybananaapple

Three items give 3! = 6 permutations, listed in lexicographic order by fixing the first position.

Frequently asked questions

How many permutations can it handle?

Input is capped at 12 items and output at 20,000 permutations; exceeding either raises `input-too-large`. Counts grow like n!: 8 items already give 40,320, and 12 items would be 479 million.

How do I use the length field?

0 (the default) permutes all n items for n! results; a value r permutes only the first r positions for P(n,r) = n!/(n−r)! results — 5 items taken 2 at a time give 20. An r larger than the item count, or negative, is rejected.

Why do some lines look identical?

Only when the input contains identical lines: permutations are enumerated by position, not deduplicated by content. Turn on “Deduplicate first” to drop repeated lines before permuting.

Is the output order random?

No. Results are generated in lexicographic order: the first position takes input item 1, then the rest recurse, so the same input always yields the same order.

Keywords:列表全排列全排列permutationP(n,r)排列枚举所有排列顺序打乱顺序

Related tools