What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?

1.O(1)

2.O(n)

3.O(n2)

4.O(n3)

**Posted Date**:-2021-10-25 16:29:09

A linear collection of data elements where the linear node is given by means of pointer is called?

1.Linked list

2. Node list

3.Primitive list

4.Unordered list

**Posted Date**:-2021-10-25 16:29:09

Consider the following definition in c programming language. struct node { int data; struct node * next; } typedef struct node NODE; NODE *ptr; Which of the following c code is used to create new node?

1. ptr = (NODE*)malloc(sizeof(NODE));

2.ptr = (NODE*)malloc(NODE);

3.ptr = (NODE*)malloc(sizeof(NODE*));

4.ptr = (NODE)malloc(sizeof(NODE));

**Posted Date**:-2021-10-25 16:29:09

Which of the following points is/are not true about Linked List data structure when it is compared with an array?

1.Arrays have better cache locality that can make them better in terms of performance

2.It is easy to insert and delete elements in Linked List

3.Random access is not allowed in a typical implementation of Linked Lists

4.Access of elements in linked list takes less time than compared to arrays

**Posted Date**:-2021-10-25 16:29:09

You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?

1.Delete the first element

2. Insert a new element as a first element

3. Delete the last element of the list

4. Add a new element at the end of the list

**Posted Date**:-2021-10-25 16:29:09

Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked list

1.I and II

2.I and III

3.I, II and III

4.I, II and IV

**Posted Date**:-2021-10-25 16:29:09

Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?

1.Possible if X is not last node

2. Possible if size of linked list is eve

3. Possible if size of linked list is odd

4. Possible if X is not first node

**Posted Date**:-2021-10-25 16:29:09

In Linked List implementation, a node carries information regarding ___________

1.Data

2. Link

3.Data and Link

4.Node

**Posted Date**:-2021-10-25 16:29:09

In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is?

1.log 2 n

2.n?2

3.log 2 n ï¿½ 1

4.n

**Posted Date**:-2021-10-25 16:29:09

Linked list data structure offers considerable saving in _____________

1.Computational Time

2.Space Utilization

3.Space Utilization and Computational Time

4.Speed Utilization

**Posted Date**:-2021-10-25 16:29:09

The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?

1.Singly linked list

2.Doubly linked list

3.Circular doubly linked list

4.Array implementation of list

**Posted Date**:-2021-10-25 16:29:09

What does the following function do for a given Linked List with first node as head? void fun1(struct node* head) { if(head == NULL) return; fun1(head->next); printf("%d ", head->data); }

1.Prints all nodes of linked lists

2.Prints all nodes of linked list in reverse order

3.Prints alternate nodes of Linked List

4.Prints alternate nodes in reverse order

**Posted Date**:-2021-10-25 16:29:09

What is the space complexity for deleting a linked list?

1.O(1)

2.O(n)

3.Either O(1) or O(n)

4.O(logn)

**Posted Date**:-2021-10-25 16:29:09

What is the time complexity of inserting at the end in dynamic arrays?

1.O(1)

2.O(n)

3.O(logn)

4.Either O(1) or O(n)

**Posted Date**:-2021-10-25 16:29:09

What is the time complexity to count the number of elements in the linked list?

1.O(1)

2.O(n)

3.O(logn)

4.O(n2)

**Posted Date**:-2021-10-25 16:29:09

What kind of linked list is best to answer questions like ï¿½What is the item at position n?ï¿½

1.Singly linked list

2. Doubly linked list

3.Circular linked list

4.Array implementation of linked list

**Posted Date**:-2021-10-25 16:29:09

What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?

1.O(1)

2.O(n)

3.?(n)

4.?(1)

**Posted Date**:-2021-10-25 16:29:09

What would be the asymptotic time complexity to find an element in the linked list?

1.O(1)

2.O(n)

3.O(n2)

4.O(n4)

**Posted Date**:-2021-10-25 16:29:09

What would be the asymptotic time complexity to insert an element at the second position in the linked list?

1.O(1)

2.O(n)

3.O(n2)

4.O(n3)

**Posted Date**:-2021-10-25 16:29:09

Which of the following is not a disadvantage to the usage of array?

1.Fixed size

2. There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size

3. Insertion based on position

4. Accessing elements at specified positions

**Posted Date**:-2021-10-25 16:29:09

Which of these is not an application of a linked list?

1.To implement file systems

2.For separate chaining in hash-tables

3.To implement non-binary trees

4.Random Access of elements

**Posted Date**:-2021-10-25 16:29:09

- Data Structures and algorithms MCQ Questions
- Data Structure -Abstract Data Types
- Data Structure Questions and Answers Singly Linked
- Data Structures &algorithms MCQ Questions
- Data Structure Multiple Choice Questions and Answers
- Data Structure (DS) MCQ Set 1
- Data Structure (DS) MCQ Set 2
- Data Structure and Algorithms (DSA) set 1
- Data Structure and Algorithms (DSA) set 2
- Data Structure and Algorithms (DSA) set 3
- Data Structure and Algorithms (DSA) set 4
- Data Structure and Algorithms (DSA) set 5
- Linear Data Structures - List
- Data Structure MCQ questions and answer
- Data Structure MCQ questions and answer

R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!