Class CircularLinkedList<T>
A circular linked list implementation.
Inheritance
CircularLinkedList<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class CircularLinkedList<T> : IEnumerable<T>, IEnumerable
Type Parameters
Fields
|
Improve this Doc
View Source
ReferenceNode
Declaration
public CircularLinkedListNode<T> ReferenceNode
Field Value
Methods
|
Improve this Doc
View Source
Clear()
Declaration
|
Improve this Doc
View Source
Delete(T)
search and delete.
Time complexity:O(n).
Declaration
public void Delete(T data)
Parameters
Type |
Name |
Description |
T |
data |
|
|
Improve this Doc
View Source
Delete(CircularLinkedListNode<T>)
Declaration
public void Delete(CircularLinkedListNode<T> current)
Parameters
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
|
Improve this Doc
View Source
Insert(T)
Marks this data as the new reference node after insertion.
Like insert first assuming that current reference node as head.
Time complexity: O(1).
Declaration
public CircularLinkedListNode<T> Insert(T data)
Parameters
Type |
Name |
Description |
T |
data |
|
Returns
|
Improve this Doc
View Source
IsEmpty()
Declaration
Returns
|
Improve this Doc
View Source
Union(CircularLinkedList<T>)
Declaration
public void Union(CircularLinkedList<T> newList)
Parameters
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements