You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Space Complexity = O(1); max size of HashMap is 26
//Method: Put all the last indexes of a character in a hashmap and iterate through the string, whenever the character at i and the last index of the character is also i, we can make a partition.