Divide and division method and time complexity calculation