MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
List of data in which element can be inserted and removed at the same end is called as ____
A
array
B
stack
C
linked list
D
queue
Explanation: 

Detailed explanation-1: -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-2: -Stack A stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the top. A stack follows the LIFO (Last In First Out) principle, i.e., the element inserted at the last is the first element to come out.

Detailed explanation-3: -In a stack, adding and removing of elements are performed at single position which is known as “top". That means, new element is added at top of the stack and an element is removed from the top of the stack. In stack, the insertion and deletion operations are performed based on LIFO (Last In First Out) principle.

Detailed explanation-4: -A stack follows the LIFO (Last In First Out) principle, i.e., the element. inserted at the last is the first element to come out. The insertion of an element into stack is. called push operation, and deletion of an element from the stack is called pop operation.

Detailed explanation-5: -Stack is a container of objects that are inserted and removed according to the last-in first-out (LIFO) principle. Queue is a container of objects (a linear collection) that are inserted and removed according to the first-in first-out (FIFO) principle.

There is 1 question to complete.