Round 1
Questions:
There is a 2D array arr
of squares, which contains (x,y,l)
where x,y
are x and y co-ordinates (bottom-left) and l
is side length of a square. Find the Total Area covered by squares with counting overlapping area only once.
Eg : arr = [[1,1,2],[2,2,4]
Output : 24
Constraints
1 <= x,y,l <= 10^6
1 <= n <= 10^5
- PS : *x, y, l, n are integers and output is 64 bit number
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.