Don;t know how to print substrings lexicographically

https://ide.codingblocks.com/s/144621 This is my code. I am able to print all substrings but unable to do it lexicographically

Hi @tanjuljain19,
In the question pass an arraylist and store all the substrings in the arraylist. After that sort the arraylist.

https://ide.codingblocks.com/s/145482 I sorted the list but the code is workong on cb ide on

https://ide.codingblocks.com/s/145482 I sorted the arraylist but the code is not working but working perfectly on cb ide. in the course its showing input mismatch exception

the input mismatch problem resolved but its showing wrong answer for one 1st and only test case

Hi @tanjuljain19,
You need print sub sequences in this question, not sub stings.
Hence for abcd, sub sequences will also be:
ac
acd
ad
bd
Your code isn’t printing these.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.