title: Implementing a function to find whether it is possible to split array in pairs of equal number
body: <p>I am trying to implement a function to split array in equal parts and return true else false.</p>
  <p>a=[2,4,4,2] should return true as we can split in [2,2] and [4,4]</p>
  <p>a=[4,4,4] should false</p>
  <p>a=[2,4,5,2] should return false</p>
  <pre><code>def soln(n):
      
      # traverse array element 
      for i in range(0, n) : 
         
          # add current element to left Sum 
          leftSum += arr[i]  
      
          # find sum of rest array elements (rightSum) 
          rightSum = 0 
          for j in range(i+1, n) : 
              rightSum += arr[j]  
      
          # split poindex 
          if (leftSum == rightSum) : 
              return true 
         
      
      # if it is not possible to split array into 
      # two parts 
      return false
         
  </code></pre>