Skip to main content
mediumNeetCode 150

Permutations

Generate all permutations of distinct integers Input: array of unique integers Output: all possible arrangements

Every position picks an unused element, then gives it back. I care more about the give-back than the pick.

Arrays & HashingBacktracking

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.

1Array Arrangementsmedium
Based onLeetCode