Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Stack: ['A', 'B', 'C']
Pop: C
Peek: B
isEmpty: False
Size: 2
Stack: A B C
Pop: C
Peek: B
isEmpty: 0
Size: 2
Stack: A B C
Pop: C
Peek: B
isEmpty: false
Size: 2