1/26
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
LinkedList
A generic doubly linked collection in System.Collections.Generic whose elements are stored in LinkedListNode
Doubly Linked List
A linked structure in which each node can reference both the node before it and the node after it.
LinkedListNode
A node object that stores a value in a LinkedList
node.Value
Gets or sets the value stored in a LinkedListNode
node.Next
Gets the next node in the LinkedList, or null when the node is the last node.
node.Previous
Gets the previous node in the LinkedList, or null when the node is the first node.
node.List
Gets the LinkedList
new LinkedList
Creates an empty LinkedList
new LinkedList
Creates a LinkedList
list.Count
Gets the number of nodes contained in the LinkedList.
list.First
Gets the first LinkedListNode
list.Last
Gets the last LinkedListNode
list.AddFirst(value)
Creates a new node containing the specified value and adds it to the beginning of the LinkedList.
list.AddLast(value)
Creates a new node containing the specified value and adds it to the end of the LinkedList.
list.AddBefore(node, value)
Creates and inserts a new node containing the specified value immediately before a specified existing node.
list.AddAfter(node, value)
Creates and inserts a new node containing the specified value immediately after a specified existing node.
list.Remove(value)
Removes the first node containing the specified value and reports whether such a node was found.
list.Remove(node)
Removes the specified LinkedListNode
list.RemoveFirst()
Removes the node at the beginning of the LinkedList.
list.RemoveLast()
Removes the node at the end of the LinkedList.
list.Find(value)
Returns the first node containing the specified value, or null if the value is not found.
list.FindLast(value)
Returns the last node containing the specified value, or null if the value is not found.
list.Contains(value)
Determines whether the LinkedList contains the specified value.
list.Clear()
Removes all nodes from the LinkedList.
LinkedList
LinkedList
LinkedList Node Insertion
Given a valid node reference, inserting or removing nearby nodes can be performed without shifting all subsequent elements as an array-backed list may require.
LinkedList
List