Doubt Regarding the Case of Letters

Are the words rat and Rat different for this problem?

Yes, but most probably, you won’t encounter any strings containing capital letters.

Please check my code. It shows WA for all test cases. https://ide.codingblocks.com/s/298423

Can you try taking the given test case and dry run it, that’s the best strategy to debug your code if it’s not running on any of the test cases. Please try this. If still facing issues, tell me.

I have achieved partial success. It is mentioned only in the introductory para of the question to add a word when it is not found initially. My 3 test cases passed when I added the new search query to the string. Still 2 cases are left. Please check the code…

Is there need of keeping a vector.


Hope it helps!!

It really worked!!! Thanks a lot @shahidakhtar016.

Welcome buddy. The replies really boosts my confidence and create more urge to help others. Feel free to ask any doubt from me message me in coding Blocks if I know the answer I will reply or I will provide a suitable editorial.
And I am no moderator :sweat_smile::sweat_smile::sweat_smile: