Compare commits

..

No commits in common. "40f73375b9b4330a1196cb4e690ce118bb9e9de7" and "ea5d5a73ed47d4ace91e81f67c6da81c41c33a07" have entirely different histories.

4 changed files with 15 additions and 7 deletions

View File

@ -6,8 +6,10 @@ using System.Threading.Tasks;
namespace C_.Datastructures.Nodes
{
internal class DoublyLinkedListNode<T> : Node<T, DoublyLinkedListNode<T>>
{//Inherits from Node
internal class DoublyLinkedListNode<T>
{
public T? Value { get; set; } = default;
public DoublyLinkedListNode<T>? Next { get; set; } = default;
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)

View File

@ -6,8 +6,11 @@ using System.Threading.Tasks;
namespace C_.Datastructures.Nodes
{
internal class LinkedListNode<T> : Node<T, LinkedListNode<T>>
{//Inherits from Node
internal class LinkedListNode<T>
{
public T? Value { get; set; } = default;
public LinkedListNode<T>? Next { get; set; } = default;
public static LinkedListNode<T> Create(T? value, LinkedListNode<T>? next)
{
return new LinkedListNode<T>

View File

@ -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;
}

View File

@ -5,8 +5,11 @@ using System.Threading.Tasks;
namespace C_.Datastructures.Nodes
{
internal class StackNode<T> : Node<T, StackNode<T>>
{//Inherits from Node
internal class StackNode<T>
{
public T? Value { get; set; } = default;
public StackNode<T>? Next { get; set; } = default;
public static StackNode<T> Create(T? value, StackNode<T>? next)
{
return new StackNode<T>