Compare commits
4 Commits
ea5d5a73ed
...
40f73375b9
Author | SHA1 | Date | |
---|---|---|---|
40f73375b9 | |||
4fb6d4e15a | |||
c69c6ee0d3 | |||
3d5f1cfbc1 |
@ -6,10 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
internal class DoublyLinkedListNode<T>
|
||||
{
|
||||
public T? Value { get; set; } = default;
|
||||
public DoublyLinkedListNode<T>? Next { get; set; } = default;
|
||||
internal class DoublyLinkedListNode<T> : Node<T, DoublyLinkedListNode<T>>
|
||||
{//Inherits from Node
|
||||
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
|
||||
|
||||
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)
|
||||
|
@ -6,11 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
internal class LinkedListNode<T>
|
||||
{
|
||||
public T? Value { get; set; } = default;
|
||||
public LinkedListNode<T>? Next { get; set; } = default;
|
||||
|
||||
internal class LinkedListNode<T> : Node<T, LinkedListNode<T>>
|
||||
{//Inherits from Node
|
||||
public static LinkedListNode<T> Create(T? value, LinkedListNode<T>? next)
|
||||
{
|
||||
return new LinkedListNode<T>
|
||||
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
internal class Node<T, NodeType>
|
||||
{
|
||||
{//Generic Node type that every other type inherits from
|
||||
public T? Value { get; set; } = default;
|
||||
public NodeType? Next { get; set; } = default;
|
||||
}
|
||||
|
@ -5,11 +5,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
internal class StackNode<T>
|
||||
{
|
||||
public T? Value { get; set; } = default;
|
||||
public StackNode<T>? Next { get; set; } = default;
|
||||
|
||||
internal class StackNode<T> : Node<T, StackNode<T>>
|
||||
{//Inherits from Node
|
||||
public static StackNode<T> Create(T? value, StackNode<T>? next)
|
||||
{
|
||||
return new StackNode<T>
|
||||
|
Loading…
x
Reference in New Issue
Block a user