divide and conquer algorithm python code