As sir explained me that s.find(pre)!=s.end() then we have to return true.Pls can you explain this because i am confused that if iterator is not equal to end how we can return true.
Confusion in set
hi @swatantra1240_25a488bfc859a4ab that means that u have pre in the set as u are checking s.find(pre) != s.end()
hence u need to return true