Code related problem

only able to pass one case

Hey @officialharshit1996
Use vector instead of string in set otherwise gives wrong ans when 2digit or bigger number is in ans
Also ordering may be different
say
we have start as 4 and 28 in two different sequences then the sequence starting with 4 should be printed first but since u took string the one with 28 will be printed first

Here updated your code by using vector

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.