For this Question: Black widow is on a mission to get more information about hydra's whereabouts. She comes across a room where laser lines intersect to form containers. A message pops up on the screen in front of her mocking her saying that she won't be able to find the information she needs. But there's a hint too, the container with maximum water has the intel she needs. The water is polluted with a substance that causes it to become invisible so that no one can make out by seeing how much water is in the container. Help Black Widow solve the mystery and get more intel about hydra.
Find the largest rectangular area that contains most water in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit.First line contains an integer 'N' denoting the size of array. The second line contains N space-separated integers A1, A2, ..., AN denoting the elements of the array. The elements of the array represents the height of the bars.

Constraints:
1 <= N <= 10^5
1 <= A[i] <= 10^9Print a single line denoting the maximum rectangular area possible from the contiguous bars.Input
7
6 2 5 4 5 1 6

Output
12

Input
4
6 3 4 2

Output
9, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] st = br.readLine().split("\\s+");
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i]=Integer.parseInt(st[i]);
		}
		int max=Integer.MIN_VALUE;
		for(int i=0;i<n;i++){
			int j=i;
			while(j>-1 && arr[i]<=arr[j]){
				j--;
			}
			int k=j+1;
			int l=i;
			while(l<n && arr[i]<=arr[l]){
				l++;
			}
			int m = l-1;
			int total = m-k+1;
			int area = total*arr[i];
			if(area>max){
				max=area;
			}

		}
		System.out.println(max);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?