問題詳情
【題組】
(35) Consider the following C++ function that uses a divide and conquer approach to calculate the sum of a range of numbers.

Which of the following lines of code from the above function divides this problem into sub-problems?
(A) int result = sum(i, mid) + sum(mid+1, j);
(B) int mid = (i+j)/ 2;
(C) if(i==j){
(D) return result;
(E) int sum(int i, int j) {
參考答案
答案:[無官方正解]
難度:計算中-1
書單:沒有書單,新增