title: Finding subarrays in an array where length equals P * (sum of elements)
body: <p>How would we go about testing all combinations of subarrays in a array where
  length of each subarray is equal to P times the sum of subarray elements.</p>
  <p>A brief example:
  Edit:</p>
  <pre><code> A = [2,-1,3,0,1,2,1] , P =2
  </code></pre>
  <p>Desired result:</p>
  <ol>
  <li>Length = 2,<strong>P</strong> * Sum of elements = 1 . Subarrays are <code>[2,-1] , [0,1]</code></li>
  </ol>
  <p>Edit
  Constraint :</p>
  <pre><code>N represents number of elements in an array
  1 &lt;= N &lt;= 1e5
  -1000 &lt;= P &lt;= 1000
  |A[i]| &lt;= 1e6
  </code></pre>
  <p>What kind of problem set(for eg:NP-hard?) does these kind of questions fall into ? Language : C#</p>