title: Need help to determine if a given algorithm is iterative or recursive
body: <p>so I got a project for a computer science module, and they ask us to perform ITERATIVE quick and merge sorts, so I wrote an algorithm, but I am unsure if it is iterative or recursive.</p>
  <p>Any feedback would be greatly appreciated, thanks in advance!</p>
  <p>Here is the algorithm (it works, just need to know if it is iterative or not)</p>
  <pre><code>public static void quickSort(ArrayList&lt;school&gt; x){
  
      if(x.isEmpty()){        
          return ;
      }
      
      ArrayList&lt;school&gt; smaller = new ArrayList&lt;&gt;();     
      ArrayList&lt;school&gt; greater = new ArrayList&lt;&gt;();      
  
      school pivot = x.get(0);        // pivot value
      int i;      // incremental counter
      school j;       // looping value
  
      for( i=1; i &lt; x.size();i++){
          j = x.get(i);                                       
          if( j.getName().compareTo(pivot.getName()) &lt; 0 ){       
              smaller.add(j);
          }else{
              greater.add(j);
          }
      }
  
      quickSort(smaller);
      quickSort(greater);
  
      x.clear();
  
      x.addAll(smaller);
      x.add(pivot);
      x.addAll(greater);
  
  }
  </code></pre>