racer problem (divide and conquer)