ALL Students have been assigned a series of math problems thathave points associated with them. Given a sorted points array,minimize the number of problems a student needs to solve based onthe criteria below: 1. They must always solve the first problem,index i = 0. 2. After solving the ith problem, they have a choice:solve the next problem (i+1) or skip ahead and work the (i+2)problem. 3. Students must keep solving problems until thedifference between the maximum point and the minimum point solvedso far meets or exceeds a specified threshold. 4. If the studentcannot meet or exceed the threshold, they must work all theproblems. Return the minimum number of problems a student needs tosolve. Example threshold = 4 points = [1, 2, 3, 5, 8] If a studentsolves points[0] = 1, points[2] = 3 and points[3] = 5, then thedifference between the minimum and the maximum points solved is 5-1– 4. This meets the threshold, so the student must solve at least 3problems. Return 3.