University of California, Berkeley
EECS Department - Computer Science Division

CS3 Lecture 11 : We Take An Exam Together


Overview of today's lecture


Review

Recursion


We Take An Exam Together

Overview

Advanced Recursion: grow-mountains

: (grow-mountains 0)
()

: (grow-mountains 4)   
(1 121 12321 1234321)

Advanced Recursion: binary

: (binary 1)
(0 1)

: (binary 2)
(00 01 10 11)

: (binary 3)
(000 001 010 011 100 101 110 111)

Advanced Recursion: strip-most-popular-letter

: (strip-most-popular-letter '(cs3 is the best class))
(c3 i th bet cla)


Summary

Next Time

Puzzle : Shuffling cards

: (shuffle '(1 2)) ==> (1 2)
: (shuffle '(1 2 3 4)) ==> (1 3 2 4)
: (shuffle '(1 3 2 4)) ==> (1 2 3 4)

Matchboxes ["Pentagames" by Pentagram, Fireside Publishing, 1990]

| | | - - - - | | | - - - - | | | - - - - | | |