divide an conquer works