Given two strings - input1 and input2, determine if they are isomorphic. Two strings are isomorphic if the letters in one string can be remapped to get the second string. Remapping a letter means replacing all occurrences of it with another letter. The ordering of the letters remains unchanged. You can also think of isomorphism as it is used in chemistry - i.e. having the same form or overall shape. Target linear time and space complexity with your solution.
One of the biggest hints is provided in the last line of the problem description. When targeting linear O(n) time complexity for problems that will require some sort of record keeping - you should immediately think of using one or multiple HashMaps in your solution. For this problem, 2 HashMaps should do the trick.
Use 2 HashMaps and store the Character -> Count mapping for each input String in these maps. After the character -> count mapping is stored, iterate over both the Strings and compare the character count values stored in the corresponding maps. If at any stage the count is not the same, return false. At the end of the loop, return true.