a) Optimal substructure
b) Overlapping subproblems
c) Both overlapping subproblems and optimal substructure
d) Greedy substructure
int sum[len], idx; 2. sum[0] = arr[0]; 3. for(idx = 1; idx < len; idx++) 4. sum[idx] = max(sum[idx - 1] + arr[idx], ar
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
int sum[len], idx; 2. sum[0] = arr[0]; 3. for(idx = 1; idx < len; idx++) 4. sum[idx] = max(sum[idx - 1] + arr[idx], ar
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!