diff --git a/SimpleArrayMap/src/solution/SimpleArrayMap.java b/SimpleArrayMap/src/solution/SimpleArrayMap.java index 208d1ec..e8cef81 100644 --- a/SimpleArrayMap/src/solution/SimpleArrayMap.java +++ b/SimpleArrayMap/src/solution/SimpleArrayMap.java @@ -64,7 +64,23 @@ public class SimpleArrayMap implements ISimpleMap { @Override public V remove(K k) { - // TODO Auto-generated method stub + + V tempValue; + + if (k == null) { + return null; + } + + for (int i = 0; i < values.length; i++) { + if (k.equals(keys[i])) { + tempValue = values[i]; + keys[i] = null; + values[i] = null; + size--; + return tempValue; + } + } + return null; }