Having N > 2 will require you to do a sort on the pivots :P Also you will require that the array size be at least N. N = 2 is a perfect size --
size = 0 -> no sort
size = 1 -> no sort
size = 2 -> pivots can be made, thus can be sorted
etc.
size = 0 -> no sort
size = 1 -> no sort
size = 2 -> pivots can be made, thus can be sorted
etc.
3. P1 must be less than P2, otherwise they are swapped.