Few test cases are failing. Why is it so? Can I overcome that??
Few test cases failing
@J19APPPP0007
Try this testcase
Input :
BAA
Expected Output :
AAB
ABA
BAA
Your Output :
BAA
ABA
AAB
Your outputs are not sorted.
How to sort the outputs?
Store them in vector of strings and then call the sort function on the vector
vector v ;
Store your answer strings in v
Then call sort function of < algorithm > on it.
sort ( v.begin() , v.end() ) ;