Quicksort Diagramming Technique



Below is an an example of how to diagram a Quicksort of eight integers,
using the algorithm described here.
Brackets indicate the current partition, and the pivot value is underlined.
After the partitioning, an asterisk is placed above the pivot in its new position.

 [43   19   77   54   61   16   36   58]
  --
                 *
  19   16   36   43   58   61   54   77


 [19   16   36]
  --
       *
  16   19   36


                     [58   61   54   77]
                      --
                           *
                      54   58   77   61


                      54   58  [77   61]
                                --
                                     *
                                61   77


  16   19   36   43   54   58   61   77