StackNode Created - Provisional setup

This commit is contained in:
Luke Else 2022-03-26 22:31:47 +00:00
parent 1db992492b
commit 6e63055274
2 changed files with 22 additions and 1 deletions

View File

@ -10,7 +10,6 @@ namespace C_.Datastructures.Nodes
{ {
public T? Value { get; set; } = default; public T? Value { get; set; } = default;
public DoublyLinkedListNode<T>? Next { get; set; } = default; public DoublyLinkedListNode<T>? Next { get; set; } = default;
public DoublyLinkedListNode<T>? Prev { get; set; } = default; public DoublyLinkedListNode<T>? Prev { get; set; } = default;
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev) public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
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;
public static StackNode<T> Create(T? value, StackNode<T>? next)
{
return new StackNode<T>
{
Value = value,
Next = next
};
}
}
}