DataStructures/Lists/CircularLinkedList.php 1 location
|
@@ 285-292 (lines=8) @@
|
| 282 |
|
* |
| 283 |
|
* @return mixed the data stored in the node. |
| 284 |
|
*/ |
| 285 |
|
private function deleteBeginning() { |
| 286 |
|
$temp = $this->head; |
| 287 |
|
$this->head = &$this->head->next; |
| 288 |
|
$this->tail->next = &$this->head; |
| 289 |
|
$this->size--; |
| 290 |
|
|
| 291 |
|
return $temp->data; |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
/** |
| 295 |
|
* Deletes at the specified position and returns the data stored. |
DataStructures/Lists/DoublyLinkedList.php 1 location
|
@@ 315-322 (lines=8) @@
|
| 312 |
|
* |
| 313 |
|
* @return mixed the data stored in the node. |
| 314 |
|
*/ |
| 315 |
|
private function deleteBeginning() { |
| 316 |
|
$temp = $this->head; |
| 317 |
|
$this->head = &$this->head->next; |
| 318 |
|
$this->tail->next = &$this->head; |
| 319 |
|
$this->size--; |
| 320 |
|
|
| 321 |
|
return $temp->data; |
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
/** |
| 325 |
|
* Deletes at the specified position and returns the data stored. |