Tip 1 : Solve questions and challenges regularly
Tip 2 : Use competitive programming platforms and use them efficiently
Tip 3 : Do few projects which apply your programming knowledge
Tip 1 : Keep it to the point, avoid unnecessary information
Tip 2 : Avoid false things as they aren't going to help
getSize: Returns an integer. Gets the current size of the stack
isEmpty: Returns a boolean. Gets whether the stack is empty
push: Returns nothing. Accepts an integer. Puts that integer at the top of the stack
pop: Returns nothing. Removes the top element of the stack. It does nothing if the stack is empty.
getTop: Returns an integer. Gets the top element of the stack. Returns -1 if the stack is empty
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which array operation has O(n) worst-case time complexity?