(int key)
| 42 | } |
| 43 | |
| 44 | public int Get(int key) |
| 45 | { |
| 46 | if (!_hashMap.ContainsKey(key)) |
| 47 | return -1; |
| 48 | |
| 49 | // To make this key the most recently used, remove its node and |
| 50 | // re-add it to the tail of the linked list. |
| 51 | removeNode(_hashMap[key]); |
| 52 | addToTail(_hashMap[key]); |
| 53 | |
| 54 | return _hashMap[key].Val; |
| 55 | } |
| 56 | |
| 57 | public void Put(int key, int value) |
| 58 | { |
nothing calls this directly
no outgoing calls
no test coverage detected