Design a Stack With Increment Operation at eBay
Medium79.9% acceptance
This problem has 50.0% frequency at eBay.
Problem Description
Design a stack that supports increment operations on its elements. Implement the `CustomStack` class: * `CustomStack(int maxSize)` Initializes the object with `maxSize` which is the maximum number of elements in the stack. * `void push(int x)` Adds `x` to the top of the stack if the stack has...
Read full problem and hintsTopics
Also asked at 6 companies
More eBay Questions
LRU CacheMediumRemove One Element to Make the Array Strictly IncreasingEasyPartition Equal Subset SumMediumDesign SkiplistHardMinimize Maximum Pair Sum in ArrayMedium
View all eBay questions