
Data Structures Quiz
Quiz
•
Engineering
•
University
•
Practice Problem
•
Medium
Kavitha N
Used 4+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst case time complexity of inserting a node in a doubly linked list?
O(nlogn)
O(logn)
O(n)
O(1)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following linked list: 2 -> 4 -> 7 -> 9 -> 10 -> 13. Their addresses are 2408, 2560, 1560, 5440, 3240, 3000. Head variable is pointing at 4 (the second node). What will be head -->next-->next-->value. (Node has value and next. value stores the value and next stores the address of the next variable).
7
9
10
13
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider a single linked list where F and L are pointers to the first and last elements respectively of the linked list. The time for performing which of the given operations depends on the length of the linked list? F->1->2->3->L
Delete the first element of the list
Interchange the first two elements of the list
Delete the last element of the list
Add an element at the end of the list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?
Deleting a node whose location is given
Searching an unsorted list for a given item
Inserting a node after the node with a given location
Traversing the list to process each node
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary disadvantage of using a hash table (or HashSet) to detect a loop in a linked list?
It has a higher time complexity.
It requires additional space proportional to the number of nodes.
It cannot find the starting node of the loop.
It only works on sorted linked lists.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is
log(2*n)
n/2
log(2*n) -1
n
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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); }
Prints all nodes of linked list
Prints all nodes of linked list in reverse order
Prints alternate nodes of Linked List
Prints alternate nodes in reverse order
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Quiz on Safety and Design
Quiz
•
9th Grade - University
20 questions
Lead acid Battery Quiz
Quiz
•
12th Grade - University
15 questions
Understanding SDGs and Electrical Engineering
Quiz
•
University
21 questions
Number System Conversion Challenge
Quiz
•
University
18 questions
Komposisi Tanah
Quiz
•
University
20 questions
Club Excel - Core Member Recruitment 2K25
Quiz
•
University
15 questions
Electro 2 PSW 3
Quiz
•
University
15 questions
Electric Drives and Traction Quiz
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Engineering
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
