KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am interested in creating a Java data structure similar to a stack that supports the following operations as efficiently as possible: Push, which adds a new element atop the stack, Pop, which removes the top element of the stack, Find-Max, which returns (but does not remove) the largest element of the stack, and Find-Min, which returns (but does not remove) the smallest element of the stack, and What would be the fastest implementation of this data structure? How might I go about writing it in Java?
Tags (comma-separated)
Save Edits
Cancel