Company: Optum_
Difficulty: medium
Suit Up Problem Description Mike works at a law firm and his boss Harvey has assigned him N new cases, each having its own benefit value. Harvey has asked him to divide the consecutive cases into groups such that the total benefit value of all the groups is the maximum possible. The benefit value of a group is determined by the difference between the maximum and minimum individual benefit values of the cases in that group. Harvey knows that this will be an easy task for Mike, so he has asked Mike to keep just one thing in mind. If a group consists of a single case, its value will be considered as zero. You are given an integer N, representing the number of cases, and an integer array A, representing the benefit value of the cases. Your task is to help Mike find and return an integer value representing the maximum benefit value from all the groups. Input Specification input1: An integer value N, representing the number of cases. input2: An integer array A, representing the benefit value