Class Notes (837,689)
Canada (510,396)
CSC148H1 (92)
Lecture

Exercise 4 A answers These are the answers for part A of the fourth exercise for study purposes. This is the way i did them so i'm sure there are other ways that are possibly better than mine but these are correct. ***Make sure you download the Node fi

1 Page
151 Views
Unlock Document

Department
Computer Science
Course
CSC148H1
Professor
Steve Engels
Semester
Winter

Description
from node import Nodedef maketreepreorder inorder blah if preorder or inorderreturn NonerootnodeNodepreorder0preorderremovepreorder0inorderleftinorderinorderindexrootnodekeyinorderrightinorderinorderindexrootnodekey1if inorderleft and inorderright or lenpreorder0return rootnode walk leftif preorder0 in inorderleftrootno
More Less

Related notes for CSC148H1

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit