class Solution {public: /** * max sum of the subarray * @param arr int整型vector the array * @return int整型 */ int maxsumofSubarray(vector<int>& arr) { // write code here int max_num = arr[0]; int prev_sum = 0; int size = arr.size(); fo...