DataStructures/Lists/CircularLinkedList.php 1 location
|
@@ 32-38 (lines=7) @@
|
29 |
|
private $current; |
30 |
|
private $position; |
31 |
|
|
32 |
|
public function __construct() { |
33 |
|
$this->head = null; |
34 |
|
$this->tail = &$this->head; |
35 |
|
$this->size = 0; |
36 |
|
$this->position = 0; |
37 |
|
$this->current = &$this->head; |
38 |
|
} |
39 |
|
|
40 |
|
/** |
41 |
|
* Inserts data in the specified position. |
DataStructures/Lists/SimpleLinkedList.php 1 location
|
@@ 33-38 (lines=6) @@
|
30 |
|
private $position; |
31 |
|
private $current; |
32 |
|
|
33 |
|
public function __construct() { |
34 |
|
$this->head = null; |
35 |
|
$this->size = 0; |
36 |
|
$this->position = 0; |
37 |
|
$this->current = &$this->head; |
38 |
|
} |
39 |
|
|
40 |
|
/** |
41 |
|
* Adds at the end of the list new node containing |
DataStructures/Lists/DoublyLinkedList.php 1 location
|
@@ 33-39 (lines=7) @@
|
30 |
|
private $position; |
31 |
|
private $current; |
32 |
|
|
33 |
|
public function __construct() { |
34 |
|
$this->head = null; |
35 |
|
$this->tail = &$this->head; |
36 |
|
$this->size = 0; |
37 |
|
$this->position = 0; |
38 |
|
$this->current = &$this->head; |
39 |
|
} |
40 |
|
|
41 |
|
/** |
42 |
|
* Removes all nodes of the list. It removes from the beginning. |