fix tests for sweep, harden tests for brute force and partition, begin work on median