99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代做00301J 、Java設計編程代寫
代做00301J 、Java設計編程代寫

時間:2024-10-09  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Data Structures and Algorithms Hash Tables 
CRICOS Provide Code: 00301J Page 1 of 3 
 
Note: 
• hashArray stores the key, value and state (used, free, or previously-used) 
of every hashEntry. 
We must store both the key and value since we need to check hashArray 
to tell if there is a collision and we should keep probing until we find the 
right key. 
• put(), hasKey() and get() must take the passed-in key and call hash() to 
convert the key into an integer. This integer is then used as the index for 
hashArray. 
• Java Students: If you use a private inner class for DSAHashEntry, then 
put(DSAHashEntry will need to be private, otherwise it will be public. 
• There are many hash functions in existence, but all hash functions must 
be repeatable (i.e., the same key will always give the same index). A good 
hash function is fast and will distribute keys evenly inside hashArray. 
Hash Tables 
 
Updated: 21st 
July, 2023 
 
Aims 
• To implement a hash table. 
• To make the above hash table automatically resize. 
• To save the hash table and reload it from a file. 
 
Before the Practical 
• Read this practical sheet fully before starting. 
 
Activities 

1. Hash Table Implementation 
Following the lecture slides as a guide, Create DSAHashTable class and a companion 
class called DSAHashEntry to implement a hash table with a simple hash function. Use 
linear probing first since it’s easier to think about, then convert to double-hashing. 
Assume the keys are strings and the values are Objects. 
 Data Structures and Algorithms Hash Tables 
CRICOS Provide Code: 00301J Page 2 of 3  
 
Note: 
• Of course, the latter depends on the distribution of the keys as well, so it’s 
not easy to say what a good hash function will be without knowing the 
keys. 
For the purpose of this practical, just use one of the hash functions from 
the lecture notes. 
• Use linear probing or double-hashing to handle collisions when inserting. 
• hasKey(), get() and remove() will need to use the same approach since 
they also need to find the right item. 
It’s probably a good idea to try make a private find() method that does 
the probing for these three functions and returns the index to use. Use the 
DSAHashEntry state to tell you when to stop probing. 
• Be aware that remove() with probing methods adds the problem that it 
can break probing unless additional measures are taken. 
– In particular, say we added Key1, then Key2 which collides with 
Key1, so we linearly probe and add Key2 to the next entry. 
If we remove Key1, later attempts to get Key2 will fail because Key2 
maps to where Key1 used to be. 
Since it is now null, probing will abort and imply that Key2 doesn’t 
exist. 
– The solution is to use the state filed in DSAHashEntry that tracks 
whether the entry has been used before or not. 
 
2. Resizing a Hash Table 
Modify your DSAHashTable to allow it to resize. There are various ways to determine 
when to and how to resize a hash table. 
 
The simplest way to determine when is to set an upper and lower threshold value 
for the load factor. When the number of elements is outside of this, the put() or 
remove() methods should call resize(size) automatically. 
• Remember, this will be computationally expensive (what is it it in Big-O?), so it is 
important not to set the threshold too low. Also, collisions occur more frequently 
at higher load factors, thus it is equally important to not set the threshold too 
high. Do some research to find "good" values. 
A simple way to resize is to create a new array, then iterate over hashArray (ignoring 
unused and previously used slots) and re-hashing (using put(). 
• To select a suitable size for the new array, you can either use a "look up" table of 
suitable primes or re-calculate a new prime after doubling/halving the previous 
size. 
Test your resize functionality with a small hash table size, just so you know it will 
work when you increase the size of the table. Data Structures and Algorithms Hash Tables 
CRICOS Provide Code: 00301J Page 3 of 3 
 
 
3. File I/O 
To truly test your hash table implementation, you will need a large dataset. Read in 
the RandomNames7000.csv as input to insert values into your hash table. There are some 
duplicates in the file, so your program should be able to handle them. 
 
It is also useful to be able to save the hash table. The save order is not important, 
so just iterate through the keys and values in the order they are stored in the hash 
table and write it to a .csv. 
 
Submission Deliverable 
• Your code are due 2 weeks from your current tutorial session. 
– You will demonstrate your work to your tutors during that session 
– If you have completed the practical earlier, you can demonstrate your work 
during the next session 
• You must submit your code and any test data that you have been using electronically
via Blackboard under the Assessments section before your demonstration. 
– Java students, please do not submit the *.class files 
 
Marking Guide 
Your submission will be marked as follows: 
• [6] Your DSAHashTable and DSAHashEntry are implemented correctly. 
• [4] Your hash function is well thought out and properly implemented. 
This means that it meets at least the first three criteria of a good hash function and 
you can argue that it at least partially meets the last. 
• [5] Your hash table resizes as you put and remove hash entries. 
• [5] You can read in and save .csv files. 
End of Worksheet 

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機打開當前頁
  • 上一篇:FIT5147代寫、代做css/Java編程語言
  • 下一篇:代做CITS2002、C/C++語言程序代寫
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          欧美少妇一区二区| 国产欧美日韩精品一区| 国产美女精品视频| 欧美日韩国产另类不卡| 欧美gay视频| 亚洲美女黄色| 亚洲一区二区免费视频| 亚洲国产成人av好男人在线观看| 国产精品入口福利| 国产亚洲精品一区二555| 亚洲激情网址| 香蕉乱码成人久久天堂爱免费| 有码中文亚洲精品| 99精品99久久久久久宅男| 亚洲欧美日韩另类| 免费成人黄色| 国产精品草莓在线免费观看| 国产精品久在线观看| 国内精品久久久久久久果冻传媒| 91久久夜色精品国产网站| 亚洲夜间福利| 老司机67194精品线观看| 欧美日韩在线视频一区二区| 国产精品一区=区| 一区在线视频| 亚洲午夜视频在线| 久久婷婷国产麻豆91天堂| 欧美午夜视频一区二区| 亚洲第一伊人| 久久电影一区| 国产精品www色诱视频| 黄色av成人| 午夜精品国产| 欧美三级在线| 亚洲日本成人女熟在线观看| 久久9热精品视频| 国产精品xxxav免费视频| 亚洲国产天堂久久国产91| 欧美在线观看一区| 国产精品久久久久久福利一牛影视| 亚洲高清不卡在线观看| 欧美在线视频网站| 国产精品欧美一区喷水| 国产精品99久久久久久宅男 | 国产三级精品在线不卡| 亚洲国产天堂久久综合网| 久久久久国产一区二区| 国产精品伊人日日| 亚洲男人的天堂在线观看| 欧美日韩一区三区四区| 亚洲精品影视| 欧美日韩国产综合久久| 亚洲精品国久久99热| 久热精品视频在线| 伊人精品视频| 免费成人高清| 亚洲二区视频| 欧美激情综合亚洲一二区| 亚洲精品久久久久| 欧美黄色免费网站| 一本色道久久综合亚洲91 | 午夜国产精品影院在线观看| 国产精品地址| 西西人体一区二区| 国产视频在线一区二区| 欧美自拍丝袜亚洲| 红桃视频国产精品| 欧美国产日本韩| 亚洲精品乱码久久久久久按摩观| 欧美激情1区| 在线亚洲精品| 国产精品一区在线观看| 久久久www成人免费毛片麻豆| 国内一区二区三区在线视频| 久久久久se| 亚洲精品国精品久久99热一| 欧美日韩无遮挡| 亚洲欧美日韩成人| 激情视频一区| 欧美日韩三级在线| 欧美一区二区播放| 在线精品视频免费观看 | 久久久久久久综合| 亚洲大片av| 国产精品播放| 久久久一二三| 一区二区三区四区国产精品| 国产精品综合| 久久综合九色综合久99| av成人免费| 国产精品午夜在线观看| 久久在线播放| 亚洲欧美日韩精品久久| 亚洲成人在线网| 国产精品国产自产拍高清av| 久久国产精品99国产精| 亚洲美女毛片| 好看的av在线不卡观看| 欧美日韩国产在线观看| 欧美一区二区三区喷汁尤物| 亚洲国产日韩在线一区模特| 国产精品毛片高清在线完整版| 久久天堂成人| 亚洲性夜色噜噜噜7777| 娇妻被交换粗又大又硬视频欧美| 欧美香蕉视频| 欧美精品二区| 蜜桃久久av一区| 欧美在线一二三区| 中文精品视频| 亚洲靠逼com| 亚洲国产精品女人久久久| 国产日韩精品入口| 欧美色视频在线| 欧美国产一区二区| 久久亚洲综合色| 欧美中文字幕精品| 亚洲一区二区在线看| 亚洲精品免费在线播放| 黄色精品一区二区| 国产麻豆日韩| 欧美日韩高清在线| 欧美成人午夜剧场免费观看| 久久久噜噜噜久久久| 久久er精品视频| 欧美与黑人午夜性猛交久久久| 日韩亚洲国产精品| 日韩视频在线免费| 亚洲精品一线二线三线无人区| 极品少妇一区二区| 黄色精品一区| 精品av久久707| 含羞草久久爱69一区| 国产亚洲美州欧州综合国| 国产精品久久久久一区二区三区| 欧美午夜精品理论片a级按摩| 欧美精品日韩| 欧美性大战久久久久久久| 欧美日韩成人| 欧美三区免费完整视频在线观看| 欧美日韩精品一本二本三本| 欧美精品久久久久久久久老牛影院| 麻豆成人在线观看| 你懂的视频欧美| 欧美激情一区二区三区在线视频| 欧美成人在线影院| 欧美日产在线观看| 欧美日韩一区二区三区免费看| 欧美色综合天天久久综合精品| 欧美午夜不卡| 国产日韩精品视频一区| 一区二区三区在线不卡| 亚洲日韩视频| 亚洲图片欧洲图片av| 欧美一区二区三区精品| 久久人人爽爽爽人久久久| 欧美不卡福利| 欧美视频官网| 国产日韩精品久久久| 亚洲国产精品悠悠久久琪琪| 亚洲精品欧美极品| 亚洲综合国产| 久久久人成影片一区二区三区| 欧美黄色aa电影| 国产麻豆综合| 最近中文字幕mv在线一区二区三区四区| 亚洲精品视频免费| 午夜精品久久久久久久99樱桃| 久久成人免费网| 欧美岛国激情| 国产欧美精品va在线观看| 在线日韩欧美视频| 亚洲欧美国产77777| 免费久久99精品国产自在现线| 欧美三级在线视频| 狠狠色狠狠色综合日日五| 日韩亚洲精品在线| 老司机一区二区三区| 欧美日韩国产综合视频在线观看中文| 国产精品色网| 亚洲人成网站在线播| 性高湖久久久久久久久| 欧美国产极速在线| 国产亚洲一区二区在线观看| 亚洲欧洲精品一区二区三区不卡| 午夜伦欧美伦电影理论片| 免费不卡视频| 国产日韩免费| 亚洲欧美999| 欧美日韩亚洲一区二区三区在线| 国内精品写真在线观看| 亚洲天堂av综合网| 欧美精品一区二区在线观看| 在线精品亚洲一区二区| 欧美一区二区三区免费视| 欧美三日本三级少妇三2023| 亚洲激情视频在线观看| 久久久久久久综合日本| 国产伦精品一区二区三区四区免费| avtt综合网|