Update circular_linked_list.cpp

This commit is contained in:
Alvin Philips 2021-11-02 07:30:28 +05:30
parent 18c7f8719e
commit b97d2b9b66

View File

@ -70,10 +70,14 @@ class CircularLinkedList {
/**
* @brief Copy constructor for CircularLinkedList.
*/
CircularLinkedList(CircularLinkedList& copy) {
CircularLinkedList(const CircularLinkedList& copy) {
root = copy.root;
end = copy.end;
}
void operator=(const CircularLinkedList& other) {
root = other.root;
end = other.end;
}
/**
* @brief Cleans up memory
*/