日韩精品一区二区三区高清_久久国产热这里只有精品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++語言程序代寫
  • 無相關信息
    合肥生活資訊

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

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

    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>
        欧美一区二区免费观在线| 亚洲综合色网站| 国产精品日韩高清| 女女同性女同一区二区三区91| 宅男噜噜噜66一区二区| 国产精品ⅴa在线观看h| 亚洲影视在线播放| 日韩午夜精品| 亚洲乱码国产乱码精品精天堂| 欧美三区在线视频| 麻豆freexxxx性91精品| 欧美黄色一级视频| 日韩手机在线导航| 黄色资源网久久资源365| 欧美aⅴ99久久黑人专区| 久久精品一本| 欧美日韩中文字幕日韩欧美| 亚洲一区二区久久| 欧美一区国产二区| 国内精品久久久久久久影视蜜臀| 99热这里只有精品8| 亚洲国产精品久久久久秋霞影院| 欧美日韩精品一本二本三本| 欧美老女人xx| 欧美日本免费| 国产人成精品一区二区三| 欧美精品国产精品日韩精品| 久久手机精品视频| 麻豆av福利av久久av| 亚洲精品美女久久7777777| 亚洲精品久久久久久久久| 国产欧美va欧美va香蕉在| 国产午夜精品在线| 久久免费偷拍视频| 另类酷文…触手系列精品集v1小说| 欧美成人影音| 午夜精品久久久久久久99水蜜桃| 亚洲欧美日韩国产一区| 亚洲靠逼com| 亚洲女女做受ⅹxx高潮| 亚洲欧美影音先锋| 一区二区福利| 亚洲国产精品成人综合| 亚洲免费视频中文字幕| 99视频一区| 欧美大片在线观看一区二区| 欧美激情精品久久久久久变态| 一区二区毛片| 国产精品自拍网站| 在线日韩精品视频| 欧美一级久久| 欧美aⅴ一区二区三区视频| 99精品福利视频| 欧美大片免费观看在线观看网站推荐| 亚洲国产精品久久久久| 国产一区二区三区在线观看网站| 亚洲图片欧美日产| 国产情人综合久久777777| 最新成人av网站| 最近中文字幕mv在线一区二区三区四区| 亚洲天堂免费在线观看视频| 国产精品久久99| 久久久一本精品99久久精品66| 在线播放日韩| 欧美午夜理伦三级在线观看| 亚洲一线二线三线久久久| 欧美成人精品三级在线观看| 亚洲欧美国产精品桃花| 国产精品超碰97尤物18| 国产一区在线观看视频| 国产性色一区二区| 国产九区一区在线| 久热综合在线亚洲精品| 欧美精品国产精品日韩精品| 一区二区三区在线观看国产| 久久成年人视频| 国产精品久久夜| 国产精品初高中精品久久| 欧美日韩久久精品| 欧美成人r级一区二区三区| 欧美xxx成人| 一区二区亚洲欧洲国产日韩| 黄色欧美成人| 国产亚洲综合性久久久影院| 亚洲欧洲av一区二区| 久久精品国产综合精品| 亚洲欧美精品伊人久久| 国产精品国产三级欧美二区| 亚洲综合好骚| 国内精品视频在线观看| 久热精品视频| 欧美主播一区二区三区美女 久久精品人| 午夜宅男欧美| 亚洲精品久久7777| 亚洲欧美大片| 欧美不卡视频一区| 欧美精品粉嫩高潮一区二区| 欧美理论电影网| 欧美日韩中国免费专区在线看| 亚洲欧洲精品一区二区精品久久久| 国产视频精品va久久久久久| 怡红院精品视频| 久久只有精品| 亚洲日本在线观看| 亚洲黑丝一区二区| 欧美日韩在线不卡一区| 午夜精品久久99蜜桃的功能介绍| 国内精品久久国产| 美女被久久久| 国产一区二区电影在线观看| 亚洲免费视频中文字幕| 亚洲免费高清| 亚洲欧美日韩国产精品| 国产日韩欧美一区| 欧美一区二区在线免费播放| 亚洲免费婷婷| 国产精品男女猛烈高潮激情| 欧美一级片一区| 亚洲国产精品成人| 国产精品午夜春色av| 欧美日韩在线精品一区二区三区| 在线日韩成人| 亚洲男女自偷自拍| 亚洲综合首页| 欧美天天影院| 一本色道久久88综合日韩精品| 欧美精品91| 欧美性猛交xxxx乱大交蜜桃| 欧美精品久久久久久久久久| 国产人成精品一区二区三| 久久亚洲综合色一区二区三区| 国产日产欧美一区| 久久综合精品国产一区二区三区| 欧美激情第9页| 国产精品裸体一区二区三区| 亚洲一区3d动漫同人无遮挡| 国产农村妇女精品一区二区| 日韩天堂在线观看| 国产精品电影网站| 国产综合视频| 91久久久久久久久| 狠狠色狠狠色综合人人| 国产精品99久久久久久久久久久久| 久久成人这里只有精品| 男女av一区三区二区色多| 欧美亚洲视频在线看网址| 一区二区黄色| 精久久久久久| 亚洲黄色免费网站| 午夜在线电影亚洲一区| 99精品国产一区二区青青牛奶| 亚洲国产高清一区二区三区| 在线看日韩欧美| 亚洲一区精品在线| 欧美激情一区二区三区全黄| 国产精品久久久久aaaa樱花| 99国产精品视频免费观看一公开| 欧美激情一区二区三区在线视频观看| 欧美高清在线一区| 亚洲九九精品| 欧美揉bbbbb揉bbbbb| 欧美日精品一区视频| 亚洲美女精品一区| 一本高清dvd不卡在线观看|