计算机科学 > 数据结构与算法
[提交于 2016年8月21日]
标题:The Random Access Zipper: Simple, Purely-Functional Sequences
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We introduce the Random Access Zipper (RAZ), a simple, purely-functional data structure for editable sequences. A RAZ combines the structure of a zipper with that of a tree: like a zipper, edits at the cursor require constant time; by leveraging tree structure, relocating the edit cursor in the sequence requires logarithmic time. While existing data structures provide these time bounds, none do so with the same simplicity and brevity of code as the RAZ. The simplicity of the RAZ provides the opportunity for more programmers to extend the structure to their own needs, and we provide some suggestions for how to do so.
提交历史
来自:Matthew Hammer[v1] 2016年8月21日 星期日 23:15:40 UTC