DataStructures/Lists/CircularLinkedList.php 1 location
|
@@ 332-339 (lines=8) @@
|
| 329 |
|
* |
| 330 |
|
* @return mixed the data stored in the node. |
| 331 |
|
*/ |
| 332 |
|
private function deleteBeginning() { |
| 333 |
|
$temp = $this->head; |
| 334 |
|
$this->head = &$this->head->next; |
| 335 |
|
$this->tail->next = &$this->head; |
| 336 |
|
$this->size--; |
| 337 |
|
|
| 338 |
|
return $temp->data; |
| 339 |
|
} |
| 340 |
|
|
| 341 |
|
/** |
| 342 |
|
* Deletes at the specified position and returns the data stored. |
DataStructures/Lists/DoublyLinkedList.php 1 location
|
@@ 349-356 (lines=8) @@
|
| 346 |
|
* |
| 347 |
|
* @return mixed the data stored in the node. |
| 348 |
|
*/ |
| 349 |
|
private function deleteBeginning() { |
| 350 |
|
$temp = $this->head; |
| 351 |
|
$this->head = &$this->head->next; |
| 352 |
|
$this->tail->next = &$this->head; |
| 353 |
|
$this->size--; |
| 354 |
|
|
| 355 |
|
return $temp->data; |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
/** |
| 359 |
|
* Deletes at the specified position and returns the data stored. |