COMPSCI 61A Lecture Notes - Lecture 19: Memoization, Mutation

188 views5 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Homework party monday 10/10 6:30-8:30 in 247 cory. Bonus point for completing the project by thursday 10/13 @ 11:59pm. Project parties tuesday 10/11 and wednesday 10/12 6:30-8:30 in 247. Complete the participation form by thursday 10/13 @ 9:30am. A tree has a root value and a list of branches; each branch is a tree. Accessing object attributes is simple; selector functions are not necessary. Demo with tree object system (in le ex. py) Memoization can be used to keep track of bonacci values and not have to recompute for the bonacci tree. Removing subtrees from a tree is called pruning. Pruning out all memoized or repeated branches in the b tree. Make the recursive call to prune each of the branches" branches. Pick a positive integer n as the start. If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents