- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Dictionaries Collection of items. Each item is a pair. (key, element) Pairs have different keys. Application Collection of student records in this class. (key, element) = (student name, linear list of assignment and exam scores) All keys are distinct. Dictionary With Duplicates Keys are not required to be distinct. Word dictionary. Pairs are of the form (word, meaning). May have two or more entries for the same word. (bolt, a threaded pin) (bolt, a crash of thunder) (bolt, to shoot forth suddenly) (bolt, a gulp) (bolt, a standard roll of cloth) etc. Dictionary Operations Static Dictionary. initialize/create get(theKey) (a.k.a. search) CD ROM word dictionary CD ROM geographic database of cities, rivers, roads, auto navigation system, etc. Dynamic Dictionary. get(theKey) (a.k.a. search) put(theKey, theElement) (a.k.a. insert) remove(theKey) (a.k.a. delete) Hash Table Dictionaries O(1) expected time for get, put, and remove. O(n) worst-case time for get, put, and remove. O(log n) if overflows handled by balanced search trees. Not suitable for nearest match queries. Get element with smallest key = theKey. Not suitable for indexed operations. Get element with third smallest key. Remove element with 5th smallest key. Bin Packing n items to be packed into bins each item has a size each bin has a capacity of c minimize number of bins Bin Packing Heuristics Best Fit. Items are packed one at a time in given order. To determine the bin for an item, first determine set S of bins into which the item fits. If S is empty, then start a new bin and put item into this new bin. Otherwise, pack into bin of S that has least available capacity. Best Fit Example n = 4 weights = [4, 7, 3, 6] capacity = 10 Best Fit n = 4 weights = [4, 7, 3, 6] capacity = 10 Best Fit n = 4 weights = [4, 7, 3, 6] capacity = 10 Best Fit n = 4 weights = [4, 7, 3, 6] capacity = 10 Best Fit n = 4 weights = [4, 7, 3, 6] capacity = 10 Best Fit n = 4 weights = [4, 7, 3, 6] capacity = 10 Implementation Of Best Fit U
您可能关注的文档
最近下载
- 2022-2023新版人教版小学数学5五年级上册(全册)教案设计.pdf VIP
- 《建筑电气照明》课件资料.ppt VIP
- 某公司年度反事故技术措施计划.doc VIP
- 人教版小学英语五年级上册单词默写&英汉互译专项A4纸直接打印.docx VIP
- 口腔门诊咨询师工作内容及考核.docx VIP
- 义务教育信息科技课程标准(2022年版).pdf VIP
- 中国行业标准 GA 1812.2-2024银行系统反恐怖防范要求 第2部分:数据中心.pdf
- 15J401 钢梯国家标准图集.pdf VIP
- GB 50348-2018 安全防范工程技术标准.docx
- 华为项目管理基本法-43210法则.pptx VIP
文档评论(0)