ISRO | ISRO CS 2017 – May | Question 79
In a doubly linked list, the number of pointers affected for an insertion operation will be
(A) 4
(B) 0
(C) 1
(D) None of these
Answer: (D)
Explanation: This depends on whether we are inserting the new node in the middle of the list (surrounded by two nodes), or at the head or tail of the list. Insertion at the middle node will affect 4 pointers whereas at the head or tail will affect only 2 pointers.
So, option (D) is correct.
Quiz of this Question
Read Full Article
Doubly linked list
Doubly linked list is a complex type of linked list in which a node contains a pointer to the previous as well as the next node in the sequence. Therefore, in a doubly linked list, a node consists of three parts: node data, pointer to the next node in sequence (next pointer) , pointer to the previous node (previous pointer). A sample node in a doubly linked list is shown in the figure.
A doubly linked list containing three nodes having numbers from 1 to 3 in their data part, is shown in the following image.
In C, structure of a node in doubly linked list can be given as :
The prev part of the first node and the next part of the last node will always contain null indicating end in each direction.
In a singly linked list, we could traverse only in one direction, because each node contains address of the next node and it doesn't have any record of its previous nodes. However, doubly linked list overcome this limitation of singly linked list. Due to the fact that, each node of the list contains the address of its previous node, we can find all the details about the previous node as well by using the previous address stored inside the previous part of each node.
Data Structures Questions – Set 10
AffairsCloud YouTube Channel - Click Here
AffairsCloud APP Click Here
Dear Aspirants,
Welcome to the Professional Knowledge Section in Affairscloud.com. Here we are providing sample questions in Data Structures. It will be useful for the IBPS SO IT officer and SBI Assistant Manager(System). We have also included some important questions that are repeatedly asked in previous exams.
- A postfix expression is merely the _____ of the prefix expression.
(A) Forward
(B) Reverse
(C) Inverse
(D) None of the above
- Which of the following begins the search with the element that is located in the middle of the Array?
(A) Random Search
(B) Parallel Search
(C) Binary Search
(D) Serial Search
- In a Circular linked list, insertion of a record involves the modification of____
(A) 1 Pointer
(B) 2 Pointer
(C) 3 Pointer
(D) None of the above
- Which of the following is useful in traversing a given graph by breadth first search?
(A) Stack
(B) List
(C) Queue
(D) None of the above
- A characteristic of the data that binary search uses but linear search ignores is______
(A) Order of the list
(B) length of the list
(C) Both (A) & (B)
(D) None of the above
Answer(A) Order of the list
- A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called__________
(A) Heap Sort
(B) Quick Sort
(C) Selection Sort
(D) None of the above
- To insert a node in a circular list at rear position, it should be inserted at ______ of the Queue.
(A) Front – 1 position
(B) Rear position
(C) Front position
(D) None of the above
- In an extended-binary tree, the nodes with two children are called ……..
(A) Interior node
(B) Domestic node
(C) Internal node
(D) Inner node
- A terminal node in a binary tree is called ______
(A) Child
(B) Leaf
(C) Branch
(D) None of the above
- Sequential representation of binary tree uses ______
(A) Three dimensional arrays
(B) Array with pointers
(C) Two dimensional arrays
(D) None of the above
Answer(B) Array with pointers
AffairsCloud Recommends Oliveboard Mock Test
IBPS RRB Officer 2021 - Free Mock Test
IBPS RRB Assistant 2021 - Free Mock Test
SBI Clerk 2021 - Free Mock Test
SBI PO - Free Mock Test
IBPS Clerk - Free Mock Test
RBI Grade B - Free Mock Test
AffairsCloud Ebook - Support Us to Grow
Govt Jobs by Category
Bank Jobs 2022 - 1,192 Vacancies |
Govt Jobs 2022 - 8,474 Vacancies |
Railway Jobs 2022 - 3,178 Vacancies |
SSC Recruitment 2022 - Various Vacancies |
ONGC Recruitment 2022 - Various Vacancies |
Bank Jobs Notification
BOB Office Assistant, Faculty Recruitment 2022 - 03 Posts
Central Bank of India Specialist Officer Recruitment 2022 - 19 Posts
SBI SO Recruitment 2022 Notification OUT - Apply Online
Bank of Maharashtra Generalist Officer Recruitment 2022 - 500 Posts
BCCB Customer Service Executive Recruitment 2022 - 165 Posts