title: How to find all possible subarrays of an array?
body: <p>Let's suppose I am given an array; <code>A[] = {1,2,3}</code> and I want to find all the sub-arrays of this array. The answer should be</p>
  <pre><code>{1}
  {1,2}
  {1,2,3}
  {2}
  {2,3}
  {3}
  </code></pre>
  <p>How to find all possible subarrays of an array efficiently?</p>