Design and Implement Special Stack Data Structure
You are given n commands. The task is to implement a stack that performs operations based on the following commands: push x: Push integer x onto the top of the stack. pop: Pop the top element from the stack. inc k y: Increment the bottom ‘k‘ elements of the stack by value ‘y‘. After each operation, print the… Read More »