Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design (2000) [19 citations — 0 self]
Abstract:
Every programmer has blind spots. Breadth-rst numbering is an interesting toy problem that exposes a blind spot common to many|perhaps most|functional programmers. Categories and Subject Descriptors D.1.1 [Programming Techniques]: Applicative (Functional) Programming General Terms Algorithms, Design Keywords Breadth-rst numbering, breadth-rst traversal, views 1. INTRODUCTION Breadth-rst traversal of a tree is easy, but rebuilding the tree afterwards seems to be much harder, at least to functional programmers. At ICFP'98, John Launchbury challenged me with the following problem: Given a tree T , create a new tree of the same shape, but with the values at the nodes replaced by the numbers 1 : : : jT j in breadth-rst order. For example, breadth-rst numbering of the tree a b # c # # d # # Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pr...
Citations
| 404 | The Science of Programming – Gries - 1981 |
| 23 | Real-time queue operations – Hood, Melville - 1981 |
| 14 | An efficient functional implementation of FIFO queues – BURTON - 1982 |

