Given an array A that contains a set of positive integer values , where 4≤≤100. Now, consider the following expression:
A[s] - A[r] + A[q] - A[p];
where p,,, and are an index of the array A, and p<<<. We want to maximize this expression. Now, answer the followings questions:
I. We generate a naive solution that considers all combinations the numbers in array A. What is the time complexity of this solution?