diff --git a/C#/Datastructures/Stack.cs b/C#/Datastructures/Stack.cs index 93f00fb..79859ad 100644 --- a/C#/Datastructures/Stack.cs +++ b/C#/Datastructures/Stack.cs @@ -23,12 +23,7 @@ namespace C_.Datastructures public void Push(T value){ //Add an Item to the top of the stack Count++; - if (Count > 0) - { - Head = StackNode.Create(value, Head); - return; - } - Head = StackNode.Create(value, default); + Head = StackNode.Create(value, Head); return; }