0 day streak
Anonymous · shared experience20 Jun 2021 · 5 views

Nagarro: Count derangements of n items

Interview question #Nagarro SDE 1 Online assessment

Problem. Count the number of ways to arrange n items so that no item ends up in its original position.

Context. This was the hardest of three problems in the fresher coding test, after finding the most frequent character in a string and computing a factorial. The candidate solved all three and moved on to the technical interview.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.