comefrom: <doocs>1013.Partition Array Into Three Parts With Equal Sum_1.py
code: def canThreePartsEqualSum( arr: List[int]) -> bool:
      s = sum(arr)
      if s % 3 != 0:
          return False
      i, j = 0, len(arr) - 1
      a = b = 0
      while i < len(arr):
          a += arr[i]
          if a == s // 3:
              break
          i += 1
      while ~j:
          b += arr[j]
          if b == s // 3:
              break
          j -= 1
      return i < j - 1
masked: def sample_funcname ( var_0 : List [ int ] ) -> bool :
      var_5 = sum ( var_0 )
      if var_5 % 3 != 0 :
          return False
      var_9 , var_12 = 0 , len ( var_0 ) - 1
      var_14 = var_13 = 0
      while var_9 < len ( var_0 ) :
          var_14 += var_0 [ var_9 ]
          if var_14 == var_5 // 3 :
              break
          var_9 += 1
      while ~ var_12 :
          var_13 += var_0 [ var_12 ]
          if var_13 == var_5 // 3 :
              break
          var_12 -= 1
      return var_9 < var_12 - 1
  