Subsequences in lexographical order

how can i print my output in lexographical order
https://ide.codingblocks.com/s/49641
https://hack.codingblocks.com/contests/c/512/73

Instead of printing the answer directly store it in a map/set (ordered) it stores the strings in lexographical order. And then print it.

1 Like

https://ide.codingblocks.com/s/49773 like this

1 Like