... <integer>
count <integer>
data <array of <DataType>>
End Stack
x x x x xx
n
count
data
0 1 2 3 n-2 n-1 max-2 max-1
Stack with pre-defined maxsize and has n elements.
n -1
top
Physical
…
25
push ... element).
15
count
top
1
pNew
count
top
0
pNew
pNew->link = top
top = pNew
count = count + 1
Push Algorithm (cont.)
<ErrorCode> Push (val DataIn <Dat...
... Tru
CSE Faculty - HCMUT
Hash Functions
• Direct hashing
• Modulo division
• Digit extraction
• Mid-square
• Folding
• Rotation
• Pseudo-random
16
01 December 2008
Cao Hoang Tru
CSE Faculty - HCMUT
Direct ... 560010 → 66
Spreading the data more evenly across the address space
26
01 December 2008
Cao Hoang Tru
CSE Faculty - HCMUT
Pseudorandom
Pseudorandom
Number Generator
Key
Rand...