+ 6
Challenge
Write a program to find the permutation of n , not all different things taking r at a time. Like , find the permutation with digits 7,6,7,8,9,8 taking 3 at a time. This question is not as easy as it seems, if it is asked taking all at a time (like, if there are 8, not all different things & we have to find permutation taking 8 at a time) then ,this becomes very easy(n!/(a!*b!....)) but here , this is not the case. Sample Input - 97897 3 Sample Output- Permutation of 97897 taking 3 at a time = 18
4 ответов
+ 18
Sorry, I have not seen before.
Thank you for the invitation. Here's my try :
https://code.sololearn.com/cr202esYb0S5/?ref=app
+ 19
RAHUL JAISWAL
I tried to explain my approach in the comment section of my code 😉
+ 2
here is my attempt in python:
https://code.sololearn.com/cLHCALs9bvwZ/?ref=app
+ 2
LukArToDo , Awesome frnd 🤞
It's my pleasure 😊,
please share your Mathematical approach of doing this, I am just a Beginner in Kotlin.