Loading...
Given a string s, partition it into as many parts as possible so that each letter appears in at most one part. Return the sizes of these parts.
Output sizes as space-separated integers.
ababcbacadefegdehijhklij
9 7 8
s is scanned to find the last occurrence of each character, storing this information for later use.