File tree 1 file changed +0
-19
lines changed
1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -215,25 +215,6 @@ public function getLastElements(int $number): ?AbstractLinkedList {
215
215
return $ list ;
216
216
}
217
217
218
- ////This problem cannot be solved if the node to be deleted is
219
- ////the last node in the linked list
220
- ////node could be marked as dummy
221
- // TODO transfer to Node class
222
- //public function deleteGivenNode(Node $node) {
223
- // if ($node == null || $node->getNext() == null) {
224
- // return null;
225
- // }
226
- // /**
227
- // * a given node should be deleted from itself.
228
- // * To do this, we simply take the next instance and
229
- // * append it to the actual one
230
- // */
231
- // $tmp = $node->getNext();
232
- // $node->setValue($tmp->getValue());
233
- // $node->setNext($tmp->getNext());
234
- // return $node;
235
- //}
236
-
237
218
/**
238
219
* iterates $number times over the head and returns a list that
239
220
* contains $number elements
You can’t perform that action at this time.
0 commit comments