title: Reversing an array Query
body: <p>I have an array of size N and I have given 2 types of query</p>
  
  <p>1 L R Reverse all element from [L,R]<br>
  2 L Find the  value at index L.</p>
  
  <pre><code>Example: [1,2,3,4,5]
  1 2 4   -&gt; [1,4,3,2,5]
  1 4 5   -&gt; [1,4,3,5,2]
  2 5    -&gt; 2
  </code></pre>
  
  <p><strong>Q</strong>-Number of Query<br>
  <strong>Q&lt;=10^5 and N&lt;=10^5</strong><Br>
  Straight Forward Solution will be <strong>O(Q*N)</strong> which will be Quite slow, how to make it faster can segment tree can be used ?</p>