Added GetCount Method to Linked List

This commit is contained in:
Luke Else 2022-04-17 23:18:46 +01:00
parent 1c5a9c83ce
commit 2a9cf2ff4d

View File

@ -122,6 +122,11 @@ namespace C_.Datastructures.LinkedList
node!.Next = node.Next!.Next; node!.Next = node.Next!.Next;
} }
public int GetCount()
{//Return the number of items in the list
return Count;
}
private LinkedListNode<T>? Traverse() private LinkedListNode<T>? Traverse()
{ {
//Start at Head of list //Start at Head of list