replace abstract method
Moves the top element into the given valid index without shifting any element (therefore replacing the value at that given index), and then pops the top element.
Implementation
void replace(int index);
Moves the top element into the given valid index without shifting any element (therefore replacing the value at that given index), and then pops the top element.
void replace(int index);