Question
Consider the following stack operations. What will be
the content of the stack after executing all the operations? Stack stack = new Stack ();Â stack.push( 5 );Â stack.push( 10 );Â stack.pop();Â stack.push( 15 );Â stack.push( 20 );Â stack.pop();Â stack.push( 25 );ÂSolution
The stack operates on a Last-In, First-Out (LIFO) principle. The operations are executed as follows:
- stack.push(5) → Stack: [5]
- stack.push(10) → Stack: [5, 10]
- stack.pop() → Removes the top element 10 . Stack: [5]
- stack.push(15) → Stack: [5, 15]
- stack.push(20) → Stack: [5, 15, 20]
- stack.pop() → Removes the top element 20 . Stack: [5, 15]
- stack.push(25) → Stack: [5, 15, 25]
President’s rule is under which Article of the Constitution of India?
The provision governing counter claim is covered under which of the following orders of CPC?
As laid down under section 162 of the Contract Act a gratuitous bailment is terminated by _______________
The purpose of Indian Evidence Act, 1872 as set out in Preamble is
What is the minimum number of persons required for constituting criminal conspiracy?
The term company is defined under which sec of the Act?
Where any authority or Committee contravenes any provision of The Scheduled Tribes and Other Traditional Forest Dwellers (Recognition of Forest Rights) ...
Under the Commercial Courts Act under what condition would a suit or application not be transferred to a Commercial Division or Commercial Court?
Under the Patents Act, 1970, which of the following cannot be patented in India?
The issue of shares by a company on a discount is prohibited and thus, it shall be ____________