Algorithm Pseudocode:
HoarePartition(A[left, right])
 pivot := A[left]
 i := left+1
 j := right
 repeat forever
  while A[i]<=pivot && i<high
   i++
  while A[j]>=pivot && j > left
   j--;
  if i < j
   swap A[i] with A[j]
  else
   swap A[left] with A[j]
   return j

Like other partitioning algorithms, Hoare Partition selects the first element as the pivot and puts all values less than the pivot on the left and all values greater than or equal to the pivot on the right.

Hoare Partition uses Two-directional scanning technique that comes from the left until it finds an element that is bigger than the pivot, and from the right until it finds an element that is smaller than the pivot and then swaps the two.

The process continues until the scan from the left meets the scan from the right.