10 February 2021

Hello

   2 8 4 7 0 3 -1 0
  p              q
   2 0 4 7 0 3 -1 8    8 > 2 so exile it to the end; decrement q
  p           q 
   0 2 4 7 0 3 -1 8    0 < 2 so swap it with p's entry; increment p
    p         q 
   0 2 -1 7 0 3 4 8    4 > 2 so swap it with q's entry; decrement q
    p        q 
   0 -1 2 7 0 3 4 8    -1 < 2 so swap it with p's entry, increment p
      p      q 
   0 -1 2 3 0 7 4 8    -1 < 2 so swap it with p's entry, increment p
      p    q 
   0 -1 2 0 3 7 4 8    -1 < 2 so swap it with p's entry, increment p
       p    q 
   0 -1 0 2 3 7 4 8    -1 < 2 so swap it with p's entry, increment p
         p q