Skip to Main Content
Elements of Programming
book

Elements of Programming

by Paul McJones, Alexander Stepanov
June 2009
Intermediate to advanced content levelIntermediate to advanced
288 pages
5h 59m
English
Addison-Wesley Professional
Content preview from Elements of Programming

Chapter 7

Coordinate Structures

Chapter 6 introduced a family of iterator concepts as the interface between algorithms and objects in data structures with immutable linear shape. This chapter goes beyond iterators to coordinate structures with more complex shape. We introduce bifurcate coordinates and implement algorithms on binary trees with the help of a machine for iterative tree traversal. After discussing a concept schema for coordinate structures, we conclude with algorithms for isomorphism, equivalence, and ordering.

7.1 Bifurcate Coordinates

Iterators allow us to traverse linear structures, which have a single successor at each position. While there are data structures with an arbitrary number of successors, in this chapter we study an ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Interviews Exposed, 4th Edition

Programming Interviews Exposed, 4th Edition

John Mongan, Noah Suojanen Kindler, Eric Giguere
The Programmer's Brain

The Programmer's Brain

Felienne Hermans

Publisher Resources

ISBN: 9780321643926Purchase book