One of the most important skills a programmer needs to learn early on is the ability to pose a problem in an abstract way. This skill is important not just for researchers but also in applied fields like software engineering and web development.
You are able to solve most of a problem, except for one last subproblem, which you have posed in an abstract way as follows: Given an array consisting of integers , define
For example, for an input array [ 10, -5, 5, 20 ], a subsegment would be computed as follows:
What is , i.e., the maximum value of among all subsegments ?
Complete the function maximumValue which takes an integer array as input and returns the maximum value of among all subsegments .