Use the divide and conquer method

Much faster