Algorithms For Dummies



Download 7,18 Mb.
Pdf ko'rish
bet270/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   266   267   268   269   270   271   272   273   ...   651
Bog'liq
Algorithms

 

»

Open addressing: The code stores the value in the next open slot by looking 

through the slots sequentially until it finds an open slot to use. The problem 

with this approach is that it assumes an open slot for each potential value

which may not be the case. In addition, open addressing means that the 

search slows considerably after the load factor increases. You can no longer 

find the needed value on the first comparison.



 

»

Rehashing: The code hashes the hash value plus a constant. For example, 

consider the value 1,020 when working with a hash table containing 30 slots 

and a constant of 100. The hash value in this case is 22. However, if slot 22 

already contains a value, rehashing (

(22 + 100) % 30

) produces a new hash 

value of 2. In this case, you don’t need to search the hash table sequentially 

for a value. When implemented correctly, a search might still include a low 

number of comparisons to find the target value.


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   266   267   268   269   270   271   272   273   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish