Partition Labels

Preview

Given a string of lowercase letters, split it into as many segments as possible so that each character appears in exactly one segment. When you concatenate all segments, they should form the original string. Return a list of integers representing the length of each segment.

Sign in to read the full chapter.

Checking access…