Stack on Array in Java

Channel:
Subscribers:
1,570
Published on ● Video Link: https://www.youtube.com/watch?v=ZhXvLSjIPTI



Duration: 12:41
27 views
0


Stack on Array in Java

In this tutorial, I have shown how to write a Java program to implement the stack data structure using an array.

A stack is a linear data structure that works on LIFO (Last In First Out) principle. The insert operation is known as the 'push' operation. The delete operation is known as the 'pop' operation. Displaying the topmost element is known as the 'peek' operation.

When the stack is full and it isn't possible to push more elements, it leads to Stack Overflow. When an stack is empty and it isn't possible to delete any element, it leads to Stack Underflow.

#stack #computerscience #isc #java #lifo







Tags:
robin sir
stack
stack on array
computer science
isc
java