Question: Quad-trees and immutable data-structures (provide total-rect-area) ; total-rect-area: returns the total integer area covered by any (one or more) rectangles in the given list ;

Quad-trees and immutable data-structures

(provide total-rect-area)

; total-rect-area: returns the total integer area covered by any (one or more) rectangles in the given list

; Don't double-count. Your solution must be in O(n log n).

; Hint: implement an immutable quad-tree to represent 2D space; FYI, a solution takes only ~30-40 lines of code. (You could also use a sorting and scanning approach.)

(define (total-rect-area rect-list)

'todo)

Write a racket code in place of todo and it must be detailed in good explanation with input and output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!