using System.Collections.Generic;
public static void Main()
PartitionLabels("ababcbacadefegdehijhklij");
Console.WriteLine("Hello World");
public static IList<int> PartitionLabels(string S) {
int[] last = new int[26];
for (int i = 0; i < S.Length; i++){
for (int i = 0; i < last.Length; i++){
Console.WriteLine(last[i]);
int boundary = 0, cnt = 0;
var ans = new List<int>();
for (int i = 0; i < S.Length; i++) {
boundary = Math.Max(boundary, last[curChar - 'a']);