previous |
start |
next
Performance: SequentialSearchST
- put(k,v): Examine each key in the list until k is found, then
update the value or until the entire list has been searched then
just insert a new Node with k and v at the beginning of the list.
Time: O(N) in worst case.
- v = get(k): In worst case, must search through all N Nodes when
the symbol table contains N keys. Time: O(N)
- delete(k): Same as get in worst case to find a Node with key
equal to k. Then deleting the Node is only changing a few links.
Time O(N)
previous |
start |
next