add median3, hoare-partition, and traditional partitioning