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 hints

Topics

Also asked at 6 companies


More eBay Questions

View all eBay questions