StackNode Created - Provisional setup
This commit is contained in:
parent
1db992492b
commit
6e63055274
@ -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)
|
||||||
|
22
C#/Datastructures/Nodes/StackNode.cs
Normal file
22
C#/Datastructures/Nodes/StackNode.cs
Normal 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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user