Time Limit Exceeded

i’m getting TLE in last two cases … even the time complexity is N

hello @Pramod123
try using unordered map in place of map