# Partition Array Into Three Parts With Equal Sum (LeetCode 1013) If the total isn't divisible by 3 the answer is false. Otherwise scan once, counting how many times the running sum hits `total/3`; reset after each hit. ```python def canThreePartsEqualSum(arr): total = sum(arr) if total % 3: return False target, run, parts = total // 3, 0, 0 for x in arr: run += x if run == target: parts += 1 run = 0 return parts >= 3 ``` Interview tip: explain why `>= 3` (not `== 3`) handles target 0. More walkthroughs: [Linkjob AI](https://www.linkjob.ai/). (Affiliation: I work on Linkjob AI.)