DataStructures/Lists/CircularLinkedList.php 1 location
|
@@ 290-295 (lines=6) @@
|
287 |
|
return null; |
288 |
|
} |
289 |
|
|
290 |
|
if($this->head->data === $data) { |
291 |
|
$this->head = &$this->head->next; |
292 |
|
$this->tail->next = &$this->head; |
293 |
|
$this->size--; |
294 |
|
return $current->data; |
295 |
|
} |
296 |
|
while($i < $this->size) { |
297 |
|
if($prev->data === $data) { |
298 |
|
$prev->next = &$current->next; |
DataStructures/Lists/DoublyLinkedList.php 1 location
|
@@ 208-216 (lines=9) @@
|
205 |
|
return null; |
206 |
|
} |
207 |
|
|
208 |
|
if($this->head->data === $data) { |
209 |
|
$aux = $this->head->prev; |
210 |
|
$this->head = &$this->head->next; |
211 |
|
$this->head->prev = &$this->tail; |
212 |
|
// $this->tail->next = &$this->head; |
213 |
|
$this->size--; |
214 |
|
|
215 |
|
return $data; |
216 |
|
} |
217 |
|
|
218 |
|
while($i < $this->size) { |
219 |
|
if($current->data === $data) { |