using C_.Datastructures.Nodes; namespace C_.Datastructures { internal class Stack { public StackNode? Head { get; set; } public int Count { get; set; } public Stack Create(){ //Create a new stack without a head return new Stack{ Head = default, Count = 0}; } public Stack Create(T value){ //Create a new Stack with a head return new Stack{ Head = new StackNode{Value = value, Next = default}, Count = 1 }; } } }