Recursion-dictionary order(smaller)

My code link is this and I have mentioned question link as well , two test cases are failed.
https://ide.codingblocks.com/s/44408

Hey Chitresh, there is no need to sort the string and also don’t use set because it is changing the order of your output. I have commented the corrections in your code you can refer this.

.