知识卡片
逆序数衡量两个链表排列差异
对同一批元素的两个链表,若一对元素的前后顺序相反,就构成一个逆序。逆序数统计两种排列的差异,可作为在线移首与离线最优排列之间的势能指标。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第27章 在线算法 · 查看原书依据
To capture this concept, we use the idea of an inversion: a pair of elements, say a and b, in which a appears before b in one list, but b appears before a in another list. For two lists L and L′, let I(L, L′), called the
参考来源
- 位置:《算法导论(第4版)》第27章《在线算法》(OEBPS/chapter027.xhtml,文本字符[15000,20000))。
- 结论依据:原文分别定义逆序、势能比较或缓存策略及其成本模型;正文补充其用途与边界。
- 原始内容:To capture this concept, we use the idea of an inversion : a pair of elements, say a and b , in which a appears before b in one list, but b appears before a in another list. For two lists L and L ′, let I ( L , L ′), called the