Regarding the error

two testcase are not passing

hello @gargshivam2001

use set of vector in place of string and then it should work

still getting the same error

inside vector store int in place of string.

using int testcases have passed but what’s the error in using string ???

…

in string the comparison is done based on every character whereas in int the comparision is done on the basis of magnitude of number.
in output file they have sorted them on the basis of magnitude.
example->
β€˜11’
β€˜1011’

then using string β€˜1011’ will come first and then β€˜11’
whichis clearly not in sorted order

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.