|
Algorithms_in_C++
1.0.0
Set of algorithms implemented in C++.
|
Public Member Functions | |
| list () | |
| bool | isEmpty () |
| void | push_back (int new_elem) |
| void | push_front (int new_elem) |
| void | erase (int old_elem) |
| void | display () |
| std::shared_ptr< link > | search (int find_elem) |
| void | reverse () |
Private Attributes | |
| std::shared_ptr< link > | first |
| link before the actual first element | |
| std::shared_ptr< link > | last |
| last link on the list | |
A list class containing a sequence of links
|
inline |
| void list::display | ( | ) |
function displays all the elements in the list
| void list::erase | ( | int | old_elem | ) |
function erases old element from the list
| old_elem | to be erased from the list |
| bool list::isEmpty | ( | ) |
function checks if list is empty
| void list::push_back | ( | int | new_elem | ) |
function adds new element to the end of the list
| new_elem | to be added to the end of the list |
| void list::push_front | ( | int | new_elem | ) |
function adds new element to the beginning of the list
| new_elem | to be added to front of the list |
| std::shared_ptr< link > list::search | ( | int | find_elem | ) |
function searchs for
| find_elem | in the list |
| find_elem | to be searched for in the list |