Some obvious problems
- It leaks memory (every
newly allocatedNode) when the Hashmap leaves the scope. - A delete/remove function is missing.
- It doesn't replace the value within the existing
Nodeon repeatedputs with the same key but instead adds an additionalNodeevery time.It doesn't replace the value within the existingNodeon repeatedputs with the same key but instead adds an additionalNodeevery time. - The size is fixed and therefore the hashmap
getquickly degenerates into linked list search. - Key and value types aren't generic.
Some positive things
- It implements a hashmap
- uses hash-lookup for search
- returns correct results