mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Added Circular Linked List
This commit is contained in:
parent
3dfb0b1c6a
commit
bd37c739b4
@ -48,6 +48,18 @@ struct Node {
|
||||
}
|
||||
};
|
||||
|
||||
class CircularLinkedList {
|
||||
private:
|
||||
Node* root; ///< Pointer to the root node
|
||||
Node* end; ///< Pointer to the last node
|
||||
|
||||
public:
|
||||
CircularLinkedList() {
|
||||
root = nullptr;
|
||||
end = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace circular_linked_list
|
||||
|
||||
} // namespace operations_on_datastructures
|
||||
|
Loading…
Reference in New Issue
Block a user