divide and conquer algorithm time and space complexity