Implement the two versions of the maximum subarray sum we discussed in class: the brute force and...
Implement the two versions of the maximum subarray sum we discussed in class: the brute force and the divide and conquer. Write your implementations in the skeleton file max_sub_sum/max_sub_sum.h. The file max_sub_sum/max_sub_sum.cpp is for your convenience it will not be used by autograding. Brute force (18pts) Implement the function template <typename Iter> int brute_max_sum(Iter start, Iter end) { return 0; } Keep the signature as it is, write the body. Divide and conquer (18pts) Implement the function int max_sub_sum(Iter start, Iter end) { return 0; } Keep the signature as it is, write the body.
Solved
COMPUTER SCIENCE
1 Answer
Vodnorsherqua x
Login to view answer.