1 / 7

CS 360 Lab 2

CS 360 Lab 2. Instructor: Krzysztof Nowak TA: Mark Boady. Part 1. Delayed Map Load file and execute exactly as instructed View the source code to figure out what happened and answer written question BST Make a BST with values 1-7

Download Presentation

CS 360 Lab 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 360 Lab 2 Instructor: Krzysztof Nowak TA: Mark Boady

  2. Part 1 • Delayed Map • Load file and execute exactly as instructed • View the source code to figure out what happened and answer written question • BST • Make a BST with values 1-7 • How do you insert the values so the height of the tree is 2? • Verify the tree using member

  3. Part 1 (define BST '())(define BST (insert 3 BST))(define BST (insert 1 BST))(define BST (insert 2 BST))(define BST (insert 6 BST)) (member 2 BST)(member 5 BST) ;Value 13: (3 (1 () (2 () ())) (6 () ()))

  4. Part 2 • Similar to last week • Test and write specifications for • len • maxmin • msort • This time in ml • Note: It is called len because length is built in

  5. Part 3 • Implementation of • n! • 2^n • Composition 2^(n!) • Follow link to see how to compose • Only 1 recursive implementation

  6. Part 4 (Extra Credit) • Implement binary tree in ml • Insert and member from Part 1(ii) • Repeat the experiment from Part 1 (ii)

  7. SML Example

More Related