https://ide.codingblocks.com/s/370971 is not passing my test cases
hello @shrutikatyal
create new map for each test case . pls check ur updated code here->
@aman212yadav
what would be the complexity of these solutions?? Can we do better using hashmaps/set