
DSA quiz
Quiz
•
Fun
•
University
•
Hard
Coder Coder
Used 1+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
Insertion sort
Quick sort
Heap sort
Merge sort
Answer explanation
2.
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
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Let P be a singly linked list. Let Q be the pointer to an intermediate node x in the list. What is the worst-case time complexity of the best known algorithm to delete the node Q from the list?
O(n)
O(log2n)
O(log n)
O(1)
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
The minimum number of stacks needed to implement a queue is
3
2
1
0
Answer explanation
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following correctly declares an array?
int sparks[20];
int spark;
sparks{20};
array sparks[20];
Answer explanation
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can be only be printed. In this arrangement, which of the following permutations of a, b, c are not possible?
b a c
b c a
c a b
a b c
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The five items: A, B, C, D, and E are pushed in a stack, one after other starting from A. The stack is popped four items and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
A
B
C
D
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
37 questions
Listening and Communication Vocabulary
Quiz
•
University
40 questions
KUIZ KEMERDEKAAN MALAYSIA KE-67, SK BINDU 2024
Quiz
•
5th Grade - University
40 questions
VOCAB AND GRAMMAR IELTS
Quiz
•
12th Grade - University
42 questions
International Trivia Knight
Quiz
•
9th Grade - University
36 questions
MARVEL
Quiz
•
KG - Professional Dev...
40 questions
Country Flags
Quiz
•
1st Grade - Professio...
36 questions
Maro's Musical Mayhem
Quiz
•
University
35 questions
Ibrahim s brain Minecraft quiz
Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade