2
def threeEqualParts(self, arr: List[int]) -> List[int]:4
count_one = arr.count(1)9
target_ones = count_one // 312
for i, bit in enumerate(arr):15
if one_count in [1, target_ones + 1, 2 * target_ones + 1]:17
if one_count in [target_ones, 2 * target_ones, 3 * target_ones]:19
i1, j1, i2, j2, i3, j3 = breaks21
if not arr[i1 : j1 + 1] == arr[i2 : j2 + 1] == arr[i3 : j3 + 1]:24
trailing_zeroes_left = i2 - j1 - 125
trailing_zeroes_mid = i3 - j2 - 126
trailing_zeroes_right = n - j3 - 127
if trailing_zeroes_right > min(trailing_zeroes_left, trailing_zeroes_mid):29
j1 += trailing_zeroes_right30
j2 += trailing_zeroes_right