LinkedList
Creating a linked list:
LinkedList<return_type> list;Functions:
Function
Description
O notation
Example use case:
LinkedList<int> list;
list.push(5);
list.push(10);
list.push(15);
std::cout << "List: ";
list.traverse(); // List: 15 10 5
std::cout << "Finding 10: " << (list.find(10) ? "Found" : "Not Found") << std::endl; // Finding 10: Found
std::cout << "Removing 10..." << std::endl; // Removing 10...
list.remove(10);
std::cout << "List after removal: ";
list.traverse(); // List after removal: 15 5 Last updated