FYI, here’s the comparison to my and to original solution for 100_000 chars:
100000-nobbz 246.44
100000-prepending 41.99 - 5.87x slower +19.76 ms
100000-appending 0.49 - 503.66x slower +2039.71 ms
FYI, here’s the comparison to my and to original solution for 100_000 chars:
100000-nobbz 246.44
100000-prepending 41.99 - 5.87x slower +19.76 ms
100000-appending 0.49 - 503.66x slower +2039.71 ms