Go Solution with a single iteration. Beats 100%
\nvar Invalid = []int{-1, -1}\n\nfunc threeEqualParts(arr []int) []int {\n\tones := make([]int, 0, len(arr))\n\tfor i, n := range arr {\n\t\tif n == 1 {\n\t\t\t
```\nvar Invalid = []int{-1, -1}\n\nfunc threeEqualParts(arr []int) []int {\n\tones := make([]int, 0, len(arr))\n\tfor i, n := range arr {\n\t\tif n == 1 {\n\t\t\tones = append(ones, i)\n\t\t}\n\t}\n\n\tif len(ones) == 0 {\n\t\treturn []int{0, len(arr) - 1}\n\t}\n\tif len(ones)%3 != 0 {\n\t\treturn Invalid\n\t}\n\n\tgr := len(ones) / 3\n\tstart1, start2, start3 := ones[0], ones[gr], ones[2*gr]\n\tgrLen := len(arr) - start3\n\n\tfirst, second, third := arr[start1:start1+grLen], arr[start2:start2+grLen], arr[start3:]\n\tif !equal(first, second, third) {\n\t\treturn Invalid\n\t}\n\n\treturn []int{start1 + grLen - 1, start2 + grLen}\n}\n\nfunc equal(a, b, c []int) bool {\n\tif len(a) != len(b) || len(a) != len(c) {\n\t\treturn false\n\t}\n\n\tfor i := 0; i < len(a); i++ {\n\t\tif a[i] != b[i] || a[i] != c[i] {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n```
['Go']