Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Showing posts with label Permutations and Combinations. Show all posts
Showing posts with label Permutations and Combinations. Show all posts

Monday, 13 May 2019

Permutations

Question:

Write a program to find Permutations in which n people can occupy r seats in a classroom.

Solution:


Sunday, 7 April 2019

Permutations and Combinations

Permutations and Combinations :

Permutations

1.nPr = n!/(n-r)!
2.nPn = n!
3.nP1 = n

Combinations

1.nCr = n!/(r! (n-r)!)
2.nC1 = n
3.nC0 = 1 = nCn
4.nCr = nCn-r
5.nCr = nPr/r!


Number of diagonals in a geometric figure of n sides = nC2-n