Https://ide.codingblocks.com/s/256895

recursion dictionary smaller

hello @ashutoshu
how to are ensuring that all strings that u r printing are in lexicolgraphical order?

also u missed to swap back again in that for loop.
approach to maintain order->
store all string that are smaller than given string in some vector , then sort the vector and print it

but it is printing correct output

ok then let me check test files

sort ur string s before calling permute function (this is because the output are lexicographical sorted order )

ur updated code->