← ALL NOTES
String

1422. Maximum Score After Splitting a String

Split a binary string into two non-empty parts; the score is (zeros in the left) + (ones in the right); maximise over all splits. Prefix/suffix sums give each split's score in O(1).

Loading…