日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

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

代做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號線
  • 短信驗證碼 酒店vi設計 deepseek 幣安下載 AI生圖 AI寫作 aippt AI生成PPT 阿里商辦

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

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

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        一区二区三区欧美| 在线一区二区日韩| 在线日韩电影| 亚洲桃色在线一区| 美女主播精品视频一二三四| 欧美日韩亚洲一区二区三区在线| 欧美日本亚洲| 欧美777四色影视在线| 久久免费精品视频| 久久国产精品网站| 在线日韩日本国产亚洲| 欧美亚洲综合在线| 欧美专区亚洲专区| 国产在线国偷精品产拍免费yy| 久久精品日韩欧美| 亚洲精品一区二区三| 亚洲调教视频在线观看| 久久亚洲欧美| 亚洲理伦在线| 亚洲欧美日韩国产一区二区| 久久久噜噜噜久久狠狠50岁| 伊人久久大香线蕉av超碰演员| 欧美日韩另类在线| 欧美一级成年大片在线观看| 欧美午夜视频| 国产精品中文字幕在线观看| 1000部精品久久久久久久久| 免费成人黄色| 午夜精品久久久久久久久久久久久| 国产精品igao视频网网址不卡日韩| 亚洲精品视频免费观看| 欧美在线国产精品| 亚洲国产高清高潮精品美女| 欧美视频在线不卡| 欧美国产精品v| 亚洲人人精品| 一色屋精品视频在线观看网站| 亚洲欧美卡通另类91av| 亚洲第一综合天堂另类专| 久久久精品2019中文字幕神马| 欧美另类变人与禽xxxxx| 欧美精品日韩三级| 欧美裸体一区二区三区| 亚洲一区二区三区高清| 欧美新色视频| 尤物精品国产第一福利三区| 久久精品国产视频| 亚洲日本理论电影| 久久久综合网| 欧美日韩视频第一区| 老司机凹凸av亚洲导航| 欧美日韩在线直播| 国产亚洲精品v| 亚洲欧美日韩国产中文| 欧美精品不卡| 亚洲福利在线看| 国产在线播精品第三| 国产日韩av一区二区| 久久精品欧洲| 亚洲性色视频| 欧美日本一区二区高清播放视频| 欧美激情一二三区| 美女尤物久久精品| 久久影院亚洲| 久久久国产一区二区三区| 欧美1区2区3区| 欧美日韩一区二区三| 亚洲欧洲日韩在线| 欧美高清在线精品一区| 亚洲永久网站| 国产精品久久久久久久久久妞妞| 欧美成人高清视频| 国产女同一区二区| 欧美日韩高清在线一区| 亚洲欧美日本精品| 亚洲国产另类精品专区| 午夜免费在线观看精品视频| 欧美日精品一区视频| 国产女人水真多18毛片18精品视频| 亚洲欧美日韩精品久久久| 国产精品一区二区久久久| 激情小说亚洲一区| 午夜久久一区| 欧美一区二区三区久久精品| 亚洲福利视频免费观看| 午夜精品亚洲一区二区三区嫩草| 性欧美18~19sex高清播放| 国产欧美日韩在线视频| 99爱精品视频| 今天的高清视频免费播放成人| 亚洲精品在线观看免费| 国产精品专区h在线观看| 伊人久久大香线蕉综合热线| 亚洲一区bb| 国内精品免费在线观看| 欧美一进一出视频| 亚洲社区在线观看| 欧美在线视频免费| 欧美电影免费网站| 亚洲电影免费观看高清完整版在线| 亚洲欧美国产高清| 欧美香蕉大胸在线视频观看| 久久成人精品| 亚洲欧美在线磁力| 国内精品一区二区三区| 欧美日本在线播放| 国产欧美日韩91| 在线精品视频在线观看高清| 国产视频久久网| 国内精品久久久久久久果冻传媒| 欧美成人免费大片| 亚洲天堂av电影| 欧美日韩一区二区在线观看视频| 久热这里只精品99re8久| 亚洲一区二区三区在线观看视频| 亚洲一区二区三区三| 国产亚洲欧洲| 日韩亚洲欧美一区| 一区精品久久| 欧美激情一区二区久久久| 香蕉久久夜色精品| 亚洲综合大片69999| 一片黄亚洲嫩模| 欧美一区二区三区在线免费观看| 亚洲日产国产精品| 国产欧美精品国产国产专区| 欧美私人网站| 亚洲高清免费| 在线不卡视频| 欧美日韩亚洲一区二区| 亚洲淫性视频| 亚洲一区免费| 国产精品xxx在线观看www| 国产日韩精品一区二区| 在线观看日韩av先锋影音电影院| 亚洲第一成人在线| 欧美猛交免费看| 欧美日韩精品免费观看视一区二区| 亚洲精品欧美日韩| 中文一区二区在线观看| 国产一区二区三区四区老人| 激情综合色综合久久综合| 国产精品一区二区在线观看| 一区二区福利| 亚洲精品国产日韩| 一区二区91| 久久精品国产清自在天天线| 久久嫩草精品久久久久| 禁久久精品乱码| 国产精品99久久99久久久二8| 久久精品国产久精国产思思| 国产精品高潮呻吟久久av无限| 亚洲欧美日韩专区| 久久综合狠狠综合久久综青草| 一本色道久久99精品综合| 亚洲图片在线观看| 国产午夜精品理论片a级大结局| 欧美一区二区三区视频| 亚洲高清在线视频| 中文亚洲字幕| 日韩一本二本av| 亚洲视频一区二区免费在线观看| 欧美国产日韩一区二区三区| 久久免费视频在线|