Arizona
Arkansas
Adding
¶
Pretend that you are
trying to find the key,
but stop when there is
no node to move to.
·
Add the new node at
the spot where you
would have moved to
if there had been a
node.
Washington
Oklahoma
Colorado
Florida
West
Virginia
Mass.
New
Hampshire
Iowa
For example, suppose that Iowa wants to join our dictionary. We start by pretending to search for Iowa, beginning at the root...