1
# Runtime: 5049 ms (Top 67.40%) | Memory: 29.4 MB (Top 23.35%)3
def maxScoreIndices(self, nums: List[int]) -> List[int]:4
zeroFromLeft = [0] * (len(nums) + 1)5
oneFromRight = [0] * (len(nums) + 1)6
for i in range(len(nums)):8
zeroFromLeft[i + 1] = zeroFromLeft[i] + 110
zeroFromLeft[i + 1] = zeroFromLeft[i]12
for i in range(len(nums))[::-1]:14
oneFromRight[i] = oneFromRight[i + 1] + 116
oneFromRight[i] = oneFromRight[i + 1]18
allSum = [0] * (len(nums) + 1)21
for i in range(len(nums) + 1):22
allSum[i] = oneFromRight[i] + zeroFromLeft[i]23
if allSum[i] > currentMax:25
currentMax = allSum[i]26
if allSum[i] == currentMax: