Hash Strategies Target: 10s
Map each char to its last index. Extend partition end greedily.
last = {c: i for i, c in enumerate(s)}
res = []
start = end = 0
for i, c in enumerate(s):
end = max(end, last[c])
if i == end:
res.append(end - start + 1)
start = i + 1
Type it from memory. Go.