Logical Error in Sanket and Strings, String Section

I tried to implement Sanket and String, I am getting correct answers on paper and pen but I am not able to implement logic in program. Can you help me, Here is my code - https://ide.codingblocks.com/s/208764

@gourav
Here is the correct code for this problem

Where? It looks like you have missed the code.

@gourav
Sry for that
Here you go https://ide.codingblocks.com/s/208182

1 Like

Hi Aarnav, thanks
can you the name the technique used in the solution, is it hashing? I understood your solution but I want to practice few more questions on this.

@gourav
There is no main concept behind this question
It is a simple logic based question you can say

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.