Question
*PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY #lang racket ;; Exercises : merge sort and line coverage (provide merge-sort line-coverage) ; Takes a list
*PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY
#lang racket
;; Exercises : merge sort and line coverage
(provide merge-sort
line-coverage)
; Takes a list of values, a partial order <= over these values, and yields a sorted list.
; See if you can implement the merge-sort algorithm recursively.
(define (merge-sort lst <=)
'todo)
; Takes a list of lines, each encoded as a list of two nonnegative integer values (start end)
; where start is no greater than end. Return the total area covered by one or more lines, without over-counting.
; For example (line-coverage '((4 7) (5 8) (12 12) (1 2)))) => 5
; Hint: there are many reasonable solutions for this. Three can be summarized as using...
; -- inclusion/exclusion principle
; -- sorting and scanning
; -- balanced binary tree
; Can you write a correct solution multiple ways? It may help you on the next project.
(define (line-coverage lines-lst)
'todo)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started