TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Implementation for a Circular Linked List. More...
#include <cassert>
#include <iostream>
#include <vector>
Go to the source code of this file.
Classes | |
struct | operations_on_datastructures::circular_linked_list::Node |
A Node struct that represents a single Node in a Binary Tree. More... | |
class | operations_on_datastructures::circular_linked_list::CircularLinkedList |
A class that implements a Circular Linked List. More... | |
Namespaces | |
namespace | operations_on_datastructures |
for std::vector | |
namespace | circular_linked_list |
Functions for the Circular Linked List implementation. | |
namespace | tests |
Testcases to check Union of Two Arrays. | |
Functions | |
void | tests::test1 () |
A Test to check an simple case. | |
void | tests::test2 () |
A Test to check an empty vector. | |
void | tests::test3 () |
A Test to check an invalid shift value. | |
void | tests::test4 () |
A Test to check a very large input. | |
void | tests::test5 () |
A Test to check a shift of zero. | |
static void | test () |
Function to test the correctness of the Circular Linked List. | |
int | main () |
main function | |
Implementation for a Circular Linked List.
A Circular Linked List is a variation on the regular linked list, in which the last node has a pointer to the first node, which creates a full circle. Consequently, this allows any node to be used as the starting point for the list.
Definition in file circular_linked_list.cpp.
int main | ( | void | ) |
main function
Definition at line 345 of file circular_linked_list.cpp.
|
static |
Function to test the correctness of the Circular Linked List.
Definition at line 333 of file circular_linked_list.cpp.