Clarifications.
This commit is contained in:
parent
fc671bedc1
commit
e6b040bb93
16
plan.txt
16
plan.txt
@ -191,21 +191,21 @@ Then test it out on a computer to make sure it's not buggy from syntax.
|
|||||||
(for when you pass a pointer to a function that may change the address where that pointer points)
|
(for when you pass a pointer to a function that may change the address where that pointer points)
|
||||||
This page is just to get a grasp on ptr to ptr. I don't recommend this list traversal style. Readability and maintainability suffer due to cleverness.
|
This page is just to get a grasp on ptr to ptr. I don't recommend this list traversal style. Readability and maintainability suffer due to cleverness.
|
||||||
- https://www.eskimo.com/~scs/cclass/int/sx8.html
|
- https://www.eskimo.com/~scs/cclass/int/sx8.html
|
||||||
* - implement (with tail pointer):
|
* - implement (I did with tail pointer & without):
|
||||||
* - size() - returns number of data elements in list
|
* - size() - returns number of data elements in list
|
||||||
* - empty() - bool returns true if empty
|
* - empty() - bool returns true if empty
|
||||||
|
* - value_at(index) - returns the value of the nth item (starting at 0 for first)
|
||||||
|
* - push_front(value) - adds an item to the front of the list
|
||||||
|
* - pop_front() - remove front item and return its value
|
||||||
|
* - push_back(value) - adds an item at the end
|
||||||
|
* - pop_back() - removes end item and returns its value
|
||||||
* - front() - get value of front item
|
* - front() - get value of front item
|
||||||
* - back() - get value of end item
|
* - back() - get value of end item
|
||||||
* - push_front(value) - adds an item to the front of the list
|
* - insert(index, value) - insert value at index, so current item at that index is pointed to by new item at index
|
||||||
* - pop_front() - remove front item
|
|
||||||
* - push_back(value) - adds an item at the end
|
|
||||||
* - pop_back() - removes end item
|
|
||||||
* - value_at(index) - returns the value of the nth item
|
|
||||||
* - insert(index, value) - insert value at index, so current item at that index is pointed to by next at index
|
|
||||||
* - erase(index) - removes node at given index
|
* - erase(index) - removes node at given index
|
||||||
* - value_n_from_end(n) - returns the value of the node at nth position from the end of the list
|
* - value_n_from_end(n) - returns the value of the node at nth position from the end of the list
|
||||||
* - reverse() - reverses the list
|
* - reverse() - reverses the list
|
||||||
* - remove(value) - removes the first item in the list with this value
|
* - remove_value(value) - removes the first item in the list with this value
|
||||||
* - Doubly-linked List
|
* - Doubly-linked List
|
||||||
- Description: https://www.coursera.org/learn/data-structures/lecture/jpGKD/doubly-linked-lists
|
- Description: https://www.coursera.org/learn/data-structures/lecture/jpGKD/doubly-linked-lists
|
||||||
- No need to implement
|
- No need to implement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user