You are given a string s. We want to partition the string into as many parts as possible so that each letter appears in at most one part.
Note that the partition is done so that after concatenating all the parts in order, the resultant string should be s.
Return a list of integers representing the size of these parts.
s = "ababcbacadefegdehijhklij"[9,7,8]s = "eccbbbbdec"[10]1 <= s.length <= 500s consists of lowercase English lettersExpected time complexity: O(n)Run your code to see results
Use Cmd+Enter to run