C
C#•3y ago
androidui

stack

what class would i use for a stack? eg
stack.push(1);
stack.push(2);
stack.top() == 2;
stack.peek() == 2;
stack.pop();
stack.top == 1;
stack.peek() == 1;
stack.push(1);
stack.push(2);
stack.top() == 2;
stack.peek() == 2;
stack.pop();
stack.top == 1;
stack.peek() == 1;
3 Replies
Want results from more Discord servers?
Add your server