Come here before submitting


#1

Don’t use your hashMap/map/unordered_map or similar type in globally.
I got many more WA for this.


#2

So what did you did finally in place of map?


#3

I declared map globally. but then cleared it when the program ended.
Because InterviewBit IDE run your global variables and others only once ( that means only in the first test case )


#4

declaring map globally and clearing it in the given function works fine…But remeber one thing if you have written all the code and getting a WA on submission
consider sorting the vector of strings, according to my logic of code it gave me crct ans only after sorting… lost some points though !