Grand Temple Ques

Ques is not clear. I am not able to get how 2 came as largest area

There’s a simple greedy solution for this. All we need to do is just store all the X and Y coordinates and then sort them. Then we will calculate maximum ΔX and ΔY where ΔX = (Xi2 -Xi1-1) & ΔY = (Yi2 -Yi1-1). Then the area will be (ΔY-1)*(ΔX-1)

Based on this algo, you can calculate the area as 2 units…

Ok got it thanks for your help