Available question text
Given an array, produce a permutation (derangement) of its elements such that no element remains in its original index, or indicate that no such derangement exists. The core challenge is handling duplicates and avoiding fixed points (derangement is impossible if any value appears more than n/2), typically solved with frequency balancing or rotating grouped elements.
Related questions
Continue with questions that share topics or the same question type.
- Build Array Where You Can Find The Maximum Exactly K Comparisons
Coding
- Find All Duplicates in an Array
Coding
- Find All K-Distant Indices in an Array
Coding
- Find All Lonely Numbers in the Array
Coding · Array · Counting · Hash Table
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 634. Find the Derangement of An Array
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source