Dictionary order larger

i have first find all permutaion of given string and stored them all in vector. Then i have find the index of the input string which must be a one of the output of permutation. Then i sort them and run a loop from the that index to end of the vector and print them.
ide: https://ide.codingblocks.com/s/194437

but not getting correct output. please check approach

Refer this…It is similar to dictionary order smaller…just you need to reverse the comaprison sign.

still not getting wrong answer in test cases . ide: https://ide.codingblocks.com/s/194617

Output must be sorted.So instead of printing the result in base case, push it into a vector. Then sort the vector in the main and then print the result.