Difference between revisions of "Dynamic Binary Int Tree Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
(Created page with "=Provided= <nowiki>(struct branch (left x right) #:transparent) (define empty-tree #f)</nowiki> =Code to Implement= ==insert== ==contains== ==sum==")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
  
 
=Code to Implement=
 
=Code to Implement=
 +
{{RacketToImplement|binary_int_tree|insert<br/>contains<br/>sum|binary_int_tree}}
 
==insert==
 
==insert==
 
==contains==
 
==contains==
 
==sum==
 
==sum==
 +
=Test=
 +
{{RacketUnitTest|binary_int_tree_test|binary_int_tree}}

Latest revision as of 07:06, 9 November 2022

Provided

(struct branch (left x right) #:transparent)

(define empty-tree #f)

Code to Implement

file: src/main/racket/binary_int_tree/binary_int_tree.rkt Racket-logo.svg
functions: insert
contains
sum

insert

contains

sum

Test

file: binary_int_tree_test.rkt Racket-logo.svg Test
source folder: src/test/racket/binary_int_tree

note: ensure that you have removed all printing to receive credit for any assignment.