Can you explain my mistake

hello please can you help me??

@Souradeep-Kundu-824545687968212 you dont have to choose a substring, you just have to tell what is the minimum number of characters required to make the current string a strong password.

can you please code it out. I had a doubt because i couldn’t solve it.

@Souradeep-Kundu-824545687968212 your approach is wrong, try to understand what the question is really asking, it is quite easy to implement.

I don’t understand why you(ishitagambhir) can’t give me a straight answer, specially you, i remember asking for help on setting up sublime text, on operators etc. and you never give me a proper answer like the others do, they always provide a link for help or explain me the the problem in details and i almost understand the topic immediately. If you don’t want to help then please don’t work at codeblocks. I takes me 3-4 days to get an answer from you and still the half answer, whereas others provide it faster. And is there a way i can stop/block you from answering my questions? I am asking for the code because i am a complete beginner and i want to learn it from you guys on how to perfect my code. The code above passes 60% of the test cases in hacker rank when you run it but the other 40% test cases fail and i want to know why?

@Souradeep-Kundu-824545687968212 i am just trying to help build your logic instead of spoonfeeding you the code, but if that is what you want then your wish.
https://ide.codingblocks.com/s/213098 this code passes all the test cases, now you can see how you misunderstood the question. If you simply want to copy paste the code served to you on a platter, every time you hit a wall then how are you going to learn? Btw, i did tell you that your whole approach was wrong. I also told you exactly what is wrong with it the first time itself.

I am very sorry :cry:, and thank you :hugs: . I was thinking of that approach but didn’t try it because of the 2nd input provided by hackerrank it says 11 digits and then why would i subtract from 6, because it would have resulted in a negative number. Thats why I got confused and frustrated and i also was understanding why and how the ‘functions’ work. I thought it was compulsory to use functions as a default template provided by hackerrank, so I was confused in the return types. Thanks for helping me I have been trying this for the last two days.and BTW you talk like my mom lol :grin:.

@Souradeep-Kundu-824545687968212 please mark the doubt as resolved.