Hey y'all,
I'm trying to write a Java method to preform a 'multi-pop" on a stack, it should "pop" "k" number of items off the top of the stack object. This is what I'm thinking, but it's not quite right, any help out there?
Thanks everyone.
public void multipop(int k){
while (top != null){
for(int i =0; i<=k; i++){
this.pop();
}}}