-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec.txt
More file actions
42 lines (31 loc) · 786 Bytes
/
spec.txt
File metadata and controls
42 lines (31 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Node
(constructors)
(get basics from Lab4)
funcs:
get next
get prior?
set next
set prior?
structure:
- word (string)
- freq (int)
- hash value (int?)
- pointer to next
- pointer to prior?
HashTable
(constructors)
needs loadcalc.
- needs a Convert() func that takes word and freq, creates new Node, calculates hashval. Invokes add() to current table.
Add() should also check load value and invoke resize if necessary.
get(), word-based.
remove(), word-based. Should be bool.
priv structure:
- array of pointers to LinkedLists.
- load values
- number of elements
- array size
needs resize function based on load.
- resize can leverage add() (to new), as well as the LinkedList removeFront() (from old) functions.
Hasher
should take word as input
should return an int value?