What would be the datastructure in following scenorio?
- by Abhishek Jain
Please note that there is no limitation of memory.
I need to insert int from 1 to 1000.
I can do the following operations in constant order of time:
push(), pop() and getMax()
Please suggest me appropriate datastructure.