尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。
Solutions to the longest increasing subsequence problem are typically implemented imperatively, relying on arrays for constant-time lookups and updates. Replacing these arrays with functional sequences allows a purely functional solution with the same asymptotic running time, but with significantly worse practical performance. In this pearl, we present a purely functional approach that is not only asymptotically optimal, but also efficient in practice. The core idea is to exploit the interplay between search, lookup, and update operations through Huet’s zipper. In addition, we improve the adaptive behaviour of imperative solutions commonly found in the literature.
DOI 原文 ·
@article{paperbot3053,
title = {Truly Functional Solutions to the Longest Uptrend Problem (Functional Pearl)},
author = {Alexander Dinges and Ralf Hinze},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {ICFP},
year = {2025},
doi = {10.1145/3747520}
}