## Two equivalent formulations of the binary search algorithm

First version: procedure binary search (: integer, : increasing integers) while    if then  else if then location else location return location Second version: procedure binary search (: integers, , : increasing integers) if then  return else if ( and … Continue reading

## Homework due and quiz #8 – Wednesday, April 20

Section 8.2 #11 Section 8.3 #8, 10, 11, 12, 13

## Homework due and quiz #7 – Wednesday, April 13

Section 8.1 #2a, 8, 14, 28, 30 Section 8.2 #4, 8

## Quizzes #5 and #6

For those of you who would like a reminder about the questions from Quiz #5 and #6… Quiz #5 (Rosen 11.2 #2) Build a binary search tree for the words oenology, phrenology, campanology, ornithology, ichthyology, limnology, alchemy and astrology using … Continue reading

## March 30 Exercise (b) and (c) from lecture

Exercise: Complete parts (b) and (c) below for your team. Team parentheses: Let be the number of ways of parenthesizing a product of numbers. Team binary rooted trees: Let be the number of full, binary, rooted trees with leaves. Team … Continue reading

## March 30 exercise (a) from lecture

Exercise: Complete part (a) below for your team. Team parentheses: Let be the number of ways of parenthesizing a product of numbers. Team binary rooted trees: Let be the number of full, binary, rooted trees with leaves. Team triangulated polygons: … Continue reading

## March 28 exercise from lecture

In the following exercise, you will be defining sequences of numbers recursively. That means that a number in the sequence is defined in terms of the numbers coming before it. Exercise 1: Complete parts (a), (b), and (c) below for … Continue reading

## Homework and quizzes

As announced today in class: You will no longer be permitted to use your homework during quizzes. You will still be able to hand in your homework for extra credit, but you must hand in your homework before a quiz … Continue reading