Operations insert, find minimum, decrease key, and merge (union) work in constant amortized time. Operations delete and delete minimum work in O(log n) amortized time. This means that starting from an empty data structure, any sequence of a operations from the first group and b operations from the second group would take O(a + b log n) time. In a binomial heap such a sequence of operations would take O((a + b)log (n)) time. A Fibonacci heap is thus better than a binomial heap when b is asymptotically smaller than a.
一个数据库只是围绕着一个单一的数据结构一个表的一些索引和花哨的算法。你无法控制引擎盖下发生的事情。你知道吗
我会尝试使用内置的Python数据结构。你知道吗
一个Fibonacci Heap可能是有益的,因为(引用文章):
相关问题 更多 >
编程相关推荐