sometimesas in steps and the pivot ends up in its original position on the right side of the array being sorted in this situationthere is only one subarray remaining to be sortedthat to the left of the pivot there is no second subarray to its right the different steps in figure occur at different levels of recursionas shown in table the initial call from main(to recquicksort(is the first levelrecquicksort(calling two new instances of itself is the second levelthese two instances calling four more instances is the third leveland so on the order in which the partitions are createdcorresponding to the step numbersdoes not correspond with depth it' not the case that all the first-level partitions are done firstthen all the second level onesand so on insteadthe left group at every level is handled before any of the right groups table recursion levels for figure step recursion level in theory there should be eight steps in the fourth level and in the fifth levelbut in this small array we run out of items before these steps are necessary