I have a question about a stack. Generally, I will define the push method in the easiest way like
Int size;
public void push(int value){
elements[size++] = value;}
If I’d like to push the integer in an increasing order and invoke pop method in a decreasing order, how could I define this method inside the same push method?