def computeArea(self, A, B, C, D, E, F, G, H):
overlap = max(min(C,G)-max(A,E), 0)*max(min(D,H)-max(B,F), 0)
return (A-C)*(B-D) + (E-G)*(F-H) - overlap
Why this solution doesn't work for java?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.