Check every pair of lines and compute area as min(height[i], height[j]) × (j - i). Track the maximum.
With , you have roughly pairs. That's far too slow.
You need a way to skip pairs that can't be optimal. What property tells you a pair is definitely worse than another?