Tip 1: Study Data Structures and Algorithms thoroughly.
Tip 2: As a fresher, you should have at least two projects on your resume.
Tip 1: Have at least two working projects on your resume.
Tip 2: Mention the skills you're strongest in so that you can confidently answer questions during the interview.



1. Push(num): Push the given number in the stack if the stack is not full.
2. Pop: Remove and print the top element from the stack if present, else print -1.
3. Top: Print the top element of the stack if present, else print -1.
4. isEmpty: Print 1 if the stack is empty, else print 0.
5. isFull: Print 1 if the stack is full, else print 0.
We perform the following operations on an empty stack which has capacity 2:
When operation 1 1 is performed, we insert 1 in the stack.
When operation 1 2 is performed, we insert 2 in the stack.
When operation 2 is performed, we remove the top element from the stack and print 2.
When operation 3 is performed, we print the top element of the stack, i.e., 3.
When operation 4 is performed, we print 0 because the stack is not empty.
When operation 5 is performed, we print 0 because the stack is size 1, which is not equal to its capacity.
I initialised an array and performed all the fundamental stack operations -push, pop, peek, isFull, isEmpty.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?