2nd and 3rd test case are not passing
@Nidhi_Alipuria using set the ordering was changed small strings should come first and then bigger.
so i have used string vector to store strings and map to remove duplicates in your code here
i hope its clear if yes dont forget to mark it as resolved 
https://ide.codingblocks.com/s/239966 i have make the changes but it is still not working what is wrong in this?
i Have done the changes but still it is not working . can you please elaborate my mistake. https://ide.codingblocks.com/s/239966
check this its your corrected code compare the changes with it https://ide.codingblocks.com/s/240016?_ga=2.17770233.1966381010.1589444709-2096337790.1589103777