Exist or not problem

https://ide.codingblocks.com/s/68369 this code is giving correct output for sample case but none of the other test cases are getting passed.

simran u have done some silly and i big mistake
firstly the cout statement u have write should be first letter caps other small u have write all caps
2ndly the map should be created inside the while loop because if u declare above it all its previous value retain or u can use m.clear() function at the end of while loop if u are declaring map above test cases while loop

hope this help:)

1 Like

https://ide.codingblocks.com/s/68369 I’ve made the correction but I’m still getting TLE in one of the test case

@Simran-Tuteja-2103059593355380 i have corrected your code you can see changes first change data types and other changes that i made. if any queries comes let me know
you can refer this.

Hey Simran,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.