Tip 1 : Be very good at Computer Networks
Tip 2 : Be very good at basic fundamentals of Data Structures
Tip 3 : Clean Resume
Tip 1 : Clean Resume
Tip 2 : CCNA certification is must
Mainly focused on Data Structures and algorithm



1. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.
2. pop() :
It pops the element from the top of the stack and returns nothing.
3. top() :
It returns the element being kept at the top of the stack.
4. getMin() :
It returns the smallest element present in the stack.
Query-1(Denoted by an integer 1): Pushes integer data to the stack. (push function)
Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack. (pop function)
Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack. (top function)
Query-4(Denoted by an integer 4): Returns the smallest element present in the stack. (getMin() function)
I used Object-Oriented Programming for this question



Two pointer approach. Swap nodes while traversing through the linked list using both pointers
It was a coding round



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
1. First I asked about edge-cases
2. Asked about taking extra space
3. Used by making two arrays for storing next previous element.
4. Solved in O(n)
It was the basic HR round.
Tip 1 : Don't fake anything
Tip 2 : Stay confident, confidence is the key

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: