Come here before submitting


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


So what did you did finally in place of map?


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 )


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 !