Three Equal Parts  Python Solution, O(n)
python\n\nclass Solution:\n    def threeEqualParts(self, arr: List[int]) -> List[int]:\n        ones = []\n        for i,num in enumerate(arr):\n            if 
```python\n\nclass Solution:\n    def threeEqualParts(self, arr: List[int]) -> List[int]:\n        ones = []\n        for i,num in enumerate(arr):\n            if num == 1:\n                ones.append(i)\n        \n        if len(ones) == 0:\n            return [0,len(arr)-1]\n        \n        if len(ones) < 3 or len(ones)%3 > 0:\n            return [-1, -1]\n        \n        endZeros = len(arr)-ones[-1]-1 \n        l1 = ones[0]\n        l2 = ones[len(ones)//3 -1]\n        m1 = ones[len(ones)//3]\n        m2 = ones[2*len(ones)//3-1]\n        r1 = ones[2*len(ones)//3]\n        r2 = ones[-1]\n        \n        if arr[l1:l2+1+endZeros] == arr[m1:m2+1+endZeros] and arr[m1:m2+1+endZeros] == arr[r1:]:\n            \n            return [l2+endZeros,m2+1+endZeros]\n            \n            \n        return [-1,-1]\n```
[]