+ 3

🏆Challenge #5🏆

Code a program that would input a word that should contain atleast three words like input : "try" And your output will show all the possible combination using each letters of the word Output : "try, tyr, rty, ryt, yrt, ytr" Any language is accepted Good luck to all Sololearners 👍😃

10th Oct 2017, 1:20 PM
#RahulVerma
#RahulVerma - avatar
5 Respostas
10th Oct 2017, 1:53 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
11th Oct 2017, 11:01 AM
LukArToDo
LukArToDo - avatar
+ 3
in javasthon: split try for i m take m[i] splice m[i] for j msplice for k //variation mvariation append msplice[(j+k)%msplicelengh] combination[i]= m[i]+mvariation combinations in code: https://code.sololearn.com/c8I0A8zvaRnz/?ref=app and here my old one https://code.sololearn.com/W1weyLtMw53T/?ref=app 😀
10th Oct 2017, 2:22 PM
ysraelcon
ysraelcon - avatar
+ 1
In Ruby: gets.chomp.split("").permutation.to_a.each { |w| print w.join + " " }
10th Oct 2017, 8:34 PM
André
André - avatar