加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

代做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++語言程序代寫
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    免费观看在线综合| 色爱av综合网| 懂色aⅴ精品一区二区三区| 久久综合国产| 日本久久伊人| 久久一综合视频| 狼人综合视频| 99国产精品自拍| 精品国产中文字幕第一页| 成人免费91| 久久精品国产99| 女人高潮被爽到呻吟在线观看| 天天做综合网| 成人毛片在线| 亚洲3区在线| 国产成人精品999在线观看| 亚洲国产高清一区| 日韩欧美视频| 色琪琪久久se色| 99re国产精品| 欧美大片专区| 久久精品亚洲人成影院| 精品国产亚洲日本| 欧美日韩123| 综合久久99| 亚洲人妖在线| 麻豆成人久久精品二区三区小说| 欧美aa视频| 久久电影tv| 蜜臂av日日欢夜夜爽一区| 99国产精品自拍| 天天av综合| av亚洲在线观看| 136国产福利精品导航网址| 精品精品99| 精品国产精品国产偷麻豆| 91欧美极品| 99精品在免费线中文字幕网站一区| 无码日韩精品一区二区免费| 999久久久国产999久久久| 久久夜色电影| 亚洲麻豆av| 亚洲国产日韩在线| 欧美日一区二区在线观看| 久久视频在线观看| 一区二区不卡| 国产亚洲欧美日韩在线观看一区二区| 欧美日韩18| 高清久久精品| 亚洲精品无吗| 日韩精品一区国产| 超碰精品在线| 另类在线视频| 蜜桃a∨噜噜一区二区三区| 亚洲国产一区二区三区在线播放| 精品一区毛片| 在线一区电影| 日韩午夜免费| 热久久国产精品| 国产一二三在线| 国产一区二区三区朝在线观看 | 国产亚洲亚洲| 玖玖玖国产精品| 麻豆免费在线| 久久亚洲资源中文字| 日本成人在线一区| 欧美人与拘性视交免费看| 日韩在线观看一区二区三区| 精品国产一区探花在线观看 | 久久激情av| 国产字幕视频一区二区| 日韩午夜一区| 92国产精品| 日本久久久久| 高清精品久久| 国产精品一区二区三区美女| 久久高清免费| 爽好多水快深点欧美视频| 三级中文字幕在线观看| 久久精品国产精品亚洲综合| 一区二区中文字| 在线视频亚洲欧美中文| 欧美色图在线播放| 老牛嫩草一区二区三区日本| 91精品影视| 国内在线观看一区二区三区| 日韩综合一区二区三区| 欧美色就是色| 欧美r级电影| 久久激情综合网| 亚洲人成网站77777在线观看| 国产调教精品| 香蕉久久夜色精品| 日本欧美一区| 欧美精美视频| 亚洲小说区图片区| 中文一区一区三区高中清不卡免费| 99精品国产福利在线观看免费| а天堂中文最新一区二区三区| www.亚洲一二| 免费日韩av片| 国产伦理一区| aaa国产精品视频| 国产毛片一区| 久久精品理论片| 9l视频自拍蝌蚪9l视频成人| 日韩午夜免费| 亚洲视频二区| 国产精品超碰| 超碰在线99| 国产精品一区二区精品视频观看| 欧美中文一区| 超碰99在线| 国产欧美日本| 亚洲激情网址| 日韩高清不卡一区| 精品精品国产三级a∨在线| 四虎8848精品成人免费网站| 伊人亚洲精品| 国内成人在线| 九九久久国产| 精品视频97| 日韩在线第七页| 亚洲理论电影| 首页亚洲欧美制服丝腿| 国产精品chinese| 先锋资源久久| 欧美在线91| 91精品秘密在线观看| 欧美精品高清| 日韩08精品| 国产免费拔擦拔擦8x在线播放| 高清一区二区三区av| 亚洲国产精品91| 美腿丝袜在线亚洲一区| 精品视频自拍| 日韩黄色在线| 99久久夜色精品国产亚洲1000部| 亚洲www啪成人一区二区| 欧美视频久久| 欧美国产日韩电影| 精品国产成人| 日韩国产91| 欧美综合久久| 日精品一区二区| 天天超碰亚洲| 久久久久久久久久久久久久久久久久久久| 激情久久久久久久| 国产日韩一区二区三区在线播放| 亚洲天堂久久| 欧美国产三级| 老司机精品导航| 精品久久国产一区| 亚洲v.com| 91精品一区国产高清在线gif| 久久久久久一区二区三区四区别墅| 99久久婷婷国产综合精品电影√| 久久精品久久精品| 天天天综合网| 国产一区二区视频在线看| 蜜桃久久久久久久| 国产精品调教| 日日嗨av一区二区三区四区| 午夜电影亚洲| 亚洲第一论坛sis| 少妇一区视频| 欧美成人日韩| 欧美人妖在线| 青娱乐极品盛宴一区二区| 99久久婷婷这里只有精品 | 日韩免费视频| 亚洲大片在线| 国产日产精品一区二区三区四区的观看方式 | 麻豆精品一区二区| 午夜在线播放视频欧美| 亚洲2区在线| 欧美亚洲三级| 蜜桃av一区二区在线观看| 精品99在线| 欧美日韩亚洲一区| 中文在线а√在线8| 亚洲香蕉网站| 西瓜成人精品人成网站| 亚洲成人精品综合在线| 国产日韩专区| 精品视频高潮| 国产精品一区二区美女视频免费看| 亚洲美女炮图| jlzzjlzz亚洲女人| 午夜视频在线观看精品中文| 久久国内精品自在自线400部| 亚洲综合国产| 少妇高潮一区二区三区| 欧美成人精品午夜一区二区| 亚洲国产尤物| 玖玖国产精品视频| 欧美一区二区麻豆红桃视频| 精品精品视频| 综合久久精品| 日韩国产一二三区|