Ropes: an alternative to strings
Software—Practice & Experience
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The CWEB System of Structured Documentation: Version 3.0
The CWEB System of Structured Documentation: Version 3.0
Journal of Functional Programming
Hi-index | 0.00 |
This functional pearl proposes an ML implementation of the Garsia-Wachs algorithm. This somewhat obscure algorithm builds a binary tree with minimum weighted path length from weighted leaf nodes with given inorder. Our solution exhibits the usual benefits of functional programming (use of immutable data structures, pattern-matching, polymorphism) and nicely compares to the purely imperative implementation from The Art of Computer Programming.