Exist or Not-hashing problems
You are using same map for every testcase
Make new map for each testcase
Or clear the map to use for next testcase
if you have more doubts regarding this feel free to ask
i hope this helps
don’t forgot to mark doubt as resolved