Made the IA solution aware

@mst-appear It's either an additional if to check if it's already in the map or a redundant put, both are cheap but i'll add the if you you want:-)  I removed it from the first if because we don't want the memory to be occupied by an empty map if the putIfAbsent fails