mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-08 23:23:05 +08:00
fix : display function removed
This commit is contained in:
@@ -142,22 +142,6 @@ int list::last() {
|
||||
else return 0;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* function displays all the elements in the list
|
||||
* @returns 'void'
|
||||
*/
|
||||
void list::display() {
|
||||
if (!isEmpty()) {
|
||||
Node *node = head;
|
||||
while (node != nullptr) {
|
||||
std::cout << node->val << "\t";
|
||||
node = node->next;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace linked_list
|
||||
} // namespace data_structures
|
||||
|
||||
|
||||
Reference in New Issue
Block a user