Divide and conquer (with tests)