Introduction

Software

Finding Mike Smith

Phonebook Algorithm

 1 pick up phone book
 2 open to middle of phone book
 3 look at names
 4 if Smith is among names
 5     call Mike
 6 else if Smith is earlier in book
 7     open to middle of left half of book
 8     go back to step 3
 9 else if Smith is later in book
 10    open to middle of right half of book
 11    go back to step 3
 12 else
 13    quit

Pseudocode

Programming Constructs

C