我是正常蛇

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年9月3日

摘要: Hash function:Solution: Use a hash function h(k) to map theuniverse U of all keys into continuous storage spaces{0, 1, ..., m–1}.Collision: When a record to be inserted maps to an alreadyoccupied slot in T.Resolving collisions:At first we assume that each key k ∈ K of keys is equally likely tobe has 阅读全文
posted @ 2012-09-03 22:51 我是正常蛇 阅读(356) 评论(0) 推荐(0) 编辑

摘要: Why comparison sort has a lower bound at least nlgn,which means T(n)=Ω(nlgn)?Decision-tree can easily tell why. A decision-tree is always a full binary tree. In camparison sort (like merge sort), every step is actually a comparison between 2 elements.And decision-tree list all these comparison cases 阅读全文
posted @ 2012-09-03 20:24 我是正常蛇 阅读(754) 评论(0) 推荐(0) 编辑