Added a verified partition function using only pointer arithmetic.