Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Permute
//Title of this code #include <iostream> #include <string> using namespace std; // n! factorial void permuteString(string s, int j) { if (j == s.length()) { cout << s << endl; return; } for (int i = j; i < s.length(); ++i) { swap(s[i], s[j]); permuteString(s, j + 1); swap(s[i], s[j]); // swap back } } int main() { permuteString("abcd", 0); }
run
|
edit
|
history
|
help
0
vc++ bug?
parantheses matching using stack in C++ - test
hangman
timeConversion
const reference life time extension
assignment
Adaptive return type
std::is_same doesn't check calling convension
MSVC_example_fscanf_s_and_chars_wchars
vector destruction - visual studio