Write a program or algorithm , to print the Permutation of given string taking r at a time. Be commented to explain it. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Write a program or algorithm , to print the Permutation of given string taking r at a time. Be commented to explain it.

Suppose , input is "alphabet" , and r is 5, then you have to print , Permutation taking 5 at a time. I can print the permutation taking all at a time ,but for doing this(taking r at a time) , complexity increases too much. Here is my approach :- 1.)Find the all the combination taking r at at a time. 2.)print all the permutation of individual combination taking all at a time. Did anyone has any other approach to this problem??

1st Jun 2018, 11:46 AM
Mr.Curious
Mr.Curious - avatar
3 Answers
0
Asking or telling? A simple course should teach you how to do that.
2nd Jun 2018, 4:10 PM
Andre Daniel
Andre Daniel - avatar
- 1
is java more harder than any other language
28th Jun 2018, 4:37 PM
Yogi
Yogi - avatar
- 1
Nope Yogi
28th Jun 2018, 4:38 PM
Andre Daniel
Andre Daniel - avatar