← Nagarro questions

Count derangements

Filed under Nagarro · Also reported at Amazon

Calculate the number of derangements of n elements, where a derangement is a permutation where no element appears in its original position.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nagarro questions

Collected from public candidate posts and coding forums. Updated Nov 2026.