MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A linked list with two address fields
A
Singly linkedlist
B
Doubly linkedlist
C
Cicular linkedlist
D
None
Explanation: 

Detailed explanation-1: -In computer science, a doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains three fields: two link fields (references to the previous and to the next node in the sequence of nodes) and one data field.

Detailed explanation-2: -No. The Singly linked list has two segments: data and link. The doubly linked list has three segments. First is data and second, third are the pointers.

Detailed explanation-3: -A doubly linked list is a bi-directional linked list. So, you can traverse it in both directions. Unlike singly linked lists, its nodes contain one extra pointer called the previous pointer. This pointer points to the previous node.

Detailed explanation-4: -No. Singly linked list allows traversal elements only in one way. Doubly linked list allows element two way traversal. On other hand doubly linked list can be used to implement stacks as well as heaps and binary trees.

Detailed explanation-5: -The first node of the doubly linked list has NULL in its left pointer and the last node of the doubly linked list has NULL in its right pointer. It is also known as a two-way linked list as there are two pointers. The benefit of this doubly linked list is that now we can navigate in both directions.

There is 1 question to complete.