kindly explain the solution of question 10 that why the answer is not b and A.
Explanation of Ques10
Q10. Algorithms STL#10 Given the following code snippet : string s = “bca”; do { cout << s << ’ '; } while(next_permutation(s.begin(), s.end())); cout << s; What is the output of the given code? bca cab cba abc bca cab cba cba bca bca bca bca bca cab cba bca
my answer is bca cab cba cba
@Mansi-Garg-813225092449370 no it will be bca cab cba abc as cba next permutation will give the starting one
@Mansi-Garg-813225092449370 refer the example here
http://www.cplusplus.com/reference/algorithm/next_permutation/
dont forget to hit like and mark resolved if cleared 