Explain the test case. The answer of the test should be 6, Which is the max possible area of temple that can be constructed.
Grand Temple Test case Not clear
@raj.bmp.333 Considering the sample case:
3
1 1
2 4
5 2
Output should be 2.
The answer should not be 6.Consider the below diagram. Shade boxes corresponding to (1,1), (2,4), (5,2) horizontally and vertically. Clearly, largest area enclosed within shaded boxes is 2.

Hope this helps 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.