Ensure that you are logged in and have the required permissions to access the test.
A server error has occurred. Please refresh the page or try after some time.
An error has occurred. Please refresh the page or try after some time.
3.3
Given an Array arr of Integers having length N, find the maximum value of min(A[i,j])×sum(A[i,j]) for all 0≤i≤j<N where A[i,j] denotes the non-empty subarray [Ai,Ai+1,Ai+2,...,Aj−1,Aj].
Since the product may be large, return the product modulo 109+7.
Note:
Input Format:
Output Format:
Constraints:
3 5 1 5 1 3 1 5 0 -1 -3 -1 0 6 -1 -5 -1 3 1 3
25 15 35
A password reset link will be sent to the following email id
?