From bd37c739b487a5cbc2fb3bdb730b28d4300b502c Mon Sep 17 00:00:00 2001 From: Alvin Philips Date: Mon, 25 Oct 2021 15:04:21 +0530 Subject: [PATCH] Added Circular Linked List --- .../circular_linked_list.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/operations_on_datastructures/circular_linked_list.cpp b/operations_on_datastructures/circular_linked_list.cpp index a5e40ab96..5c9a465fe 100644 --- a/operations_on_datastructures/circular_linked_list.cpp +++ b/operations_on_datastructures/circular_linked_list.cpp @@ -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