Algorithms and Data Structures · Middle · Question 50 of 75

How many permutations does an array of n distinct elements have?

Explanation

There are n choices for the first position, n - 1 for the second and so on. 10! is already 3.6 million, so generating all permutations works only for small n.

Further reading

Problem with a question

Algorithms and Data Structures · Middle · question 50

Test yourself

Take the Algorithms and Data Structures · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz