Sorting and searching , grand temple

how the output is 2 ? it should be 4 . the area of rectangle having coordinates (3,2) , (3,4) , (5,2) , (5,4) is 4 …

hello Neha,
can u please mention your test case clearly.
I mean how many coordinates are given and there positions

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.

3
1 1
2 4
5 2
same testcase …given in question