MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In stack insertion and deletion can take place only at one end call the ____ of the stack.
A
Path
B
Function
C
Top
D
Bottom
Explanation: 

Detailed explanation-1: -A stack has a restriction that insertion and deletion of element can only be done from only one end of stack and we call that position as top. The element at top position is called top element. Insertion of element is called PUSH and deletion is called POP.

Detailed explanation-2: -A stack is an ordered list in which all insertions and deletions are made at one end, called the top. A queue is an ordered list in which all insertions take place at one end, the rear, while all deletions take place at the other end, the front.

Detailed explanation-3: -In stack, the insertion and deletion operations are performed based on LIFO (Last In First Out) principle. In a stack, the insertion operation is performed using a function called “push” and deletion operation is performed using a function called"pop".

Detailed explanation-4: -The “top” element of the stack is the element that was last pushed and will be the first to be popped. The “bottom” element of the stack is the one that, when removed, will leave the stack empty.

Detailed explanation-5: -Explanation: The answer is b. The output-restricted queue is one of the types of the Deque data structure in which insertion is allowed from both ends but deletion is allowed from only one end. 12.

There is 1 question to complete.