title: Understanding Recursion (applying it on Bubble Sort)
body: <p>I am trying to figure out how to use recursion in programs. I understand how recursion works in classical examples like "factorial", but am not sure how to apply it on my own...</p>
  
  <p>I am starting out with converting an iterative bubble sort code into a recursive code...
  I have searched over the net for the same.... but am not able to find a convincing solution/explanation..</p>
  
  <p>Example iterative code for bubble sort is:</p>
  
  <p>arr[n]-> array with elements (1..n) which is to be sorted</p>
  
  <pre>
  for(i:1 to n)  
      for(j:1 to n-1)  
        if(arr[j+1]>arr[j])  
           swap(arr[j+1],arr[j]);
  </pre>
  
  <p>Would feel helpful if someone could give a hint about how to go about...</p>