Question: I need help to write in Dr Racket to solve to do part. Please help me on this #lang racket (provided is-balanced-tree? filter-numbers take-front drop-front

I need help to write in Dr Racket to solve to do part. Please help me on this

#lang racket

(provided is-balanced-tree?

filter-numbers

take-front

drop-front

list-depth)

; check to see if t is a balanced tree of cons cells,

; a value is a tree if it is a cons cell pairing a left sub-tree and right sub-tree,

; or if it is any non-cons value (so all values are cons trees)

; we'll call such a a tree "balanced" if the minimal path to a non-cons leaf value is the

; same as the maximal path, or at most one less.

(define (is-balanced-tree? t)

'todo)

; takes a list of filters out any value other than a number?

(define (filter-numbers lst)

'todo)

; returns a list of the first n elements in lst (assume there are at least n elements)

(define (take-front lst n)

'todo)

; returns lst without its first n elements (assume there are at least n elements)

(define (drop-front lst n)

'todo)

; a list's depth is 0 if none of its elements are lists or one plus the depth of its deepest list-element

; e.g., (list-depth '(1 2 ((()) 3 4) 5)) => 3

(define (list-depth lst)

'todo)

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!