Other problem......please help

why shwoing tle?
where the code is going infinite

i did via -->
changing each letter of the word and checking if its present in the vector

Hey say list is
Hot
Hit
Hip

You have to go from hot to hip
Now acc to ur code
U go from hot to hit then hit to hot and so on

now i removed the element form the set from which it came (transformed)

now it gives seg fault, :frowning:

Hey @hg11110000

if(s.count(b))
                        s.erase(it);

But still ur logic isnt correct
say list is hit hot hig

st = hit end =hig
so u go from hit to hot then u cand find anything but u cant retrace ur path back

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.