試卷名稱:101年 - 101 國立交通大學_碩士班考試入學試題_資訊聯招:資料結構與演算法#113301
年份:101年
科目:研究所、轉學考(插大)-資料結構
(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) {