C program to calculate the value of nPr
nPr represents n permutation r and value of nPr is (n!) / (n-r)!.
Enter n: 5 Enter r: 2 5P2 is 20
Time Complexity: O(n)
Auxiliary Space: O(n)
Please refer Permutation Coefficient for efficient methods to compute nPr.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above