+ 2
Any better to do it with mono-dimensional array?
Guys I tried to list all possible combinations of any number with one dimensional array and made it work, but does anyone have better solutions with one dimensional array? https://code.sololearn.com/cwcCMfwFHp9T/?ref=app
4 Respuestas
+ 1
It's never worth reinventing the wheel :-) Unless we want a bumpy ride.
+ 1
This looks good:
http://www.bearcave.com/random_hacks/permute.html
Code for this here: https://code.sololearn.com/ccUGM5ofibQI/#cpp
This was also interesting (it finds permutations of letters from a string)
https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/
+ 1
Thank you! Wow, that is so much simpler than my code!
+ 1
It’s good for practice tho, u have to admit that.