1.

How many permutations will be formed from the array arr={1,2,3}?(a) 2(b) 4(c) 6(d) 8I got this question during a job interview.Question is taken from Number Theory in portion Number Theory of Data Structures & Algorithms II

Answer»

Correct OPTION is (c) 6

The best I can explain: No.of PERMUTATIONS for an ARRAY of size n will be GIVEN by the formula nPn. So for the given problem, we have 3P3=6 or 3!=6.



Discussion

No Comment Found

Related InterviewSolutions