C# Stack<ValueTuple<int,int>>
Using a Named ValueTuple you can make your Stack clean and efficient. \nRead more about it here https://docs.microsoft.com/en-us/dotnet/csharp/tuples and please
Using a Named ValueTuple you can make your Stack clean and efficient. \nRead more about it here https://docs.microsoft.com/en-us/dotnet/csharp/tuples and please like if this helped!\n```\npublic class MinStack\n{\n    private Stack<(int Value, int Min)> _stack;\n\n    public MinStack()\n    {\n        _stack = new Stack<(int, int)>();\n    }\n\n    public void Push(int x)\n    {\n        var min = _stack.Any() ? Math.Min(x, GetMin()) : x;\n        _stack.Push(new ValueTuple<int, int>(x, min));\n    }\n\n    public void Pop()\n    {\n        _stack.Pop();\n    }\n\n    public int Top()\n    {\n        return _stack.Peek().Value;\n    }\n\n    public int GetMin()\n    {\n        return _stack.Peek().Min;\n    }\n}\n```
[]