Skip to main content

Instructions.

Complete a partition step by step by pressing the various buttons.
Follow this pseudocode as a guide:
While i ≤ j:
  Move i right until i finds a value >= pivot
  Move j left until j finds a value <= pivot
  if i ≤ j:  // if Indexes have not crossed
    // swap the values at i and j
    swap(list.at(i), list.at(j))
Finish by swapping the pivot with the value at j