
DSA HOTS MCQ
Quiz
•
Computers
•
University
•
Medium
Thilagavathy R
Used 4+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?
O(n2)
O(2n)
O(n)
O(1)
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?
10,20,15,23,25,35,42,39,30
15,10,25,23,20,42,35,39,30
15,20,10,23,25,42,35,39,30
15,10,23,25,20,35,42,39,30
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height h is:
2h-1
2h-1-1
2h+1-1
2h+1
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
A scheme for storing binary trees in an array X is as follows. Indexing of X starts at 1 instead of 0. the root is stored at X[1]. For a node stored at X[i], the left child, if any, is stored in X[2i] and the right child, if any, in X[2i+1]. To be able to store any binary tree on n vertices the minimum size of X should be ___________
log2n
n
2n+1
2n-1
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The B-trees of the order 4 and height 3 would have a maximum of ________ keys.
188
277
163
255
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
A single array A[1..MAXSIZE] is used to implement two stacks, The two stacks grow from opposite ends of the array. Variables top1 and top2 (top1 < top2) point to the location of the topmost element in each of the stacks, If the space is to be used efficiently, the condition for "stack full" is
(top1=MAXSIZE/2) and (top2=MAXSIZE/2 + 1)
top1 + top2 = MAXSIZE
(top1=MAXSIZE/2) and (top2=MAXSIZE)
top1 = top2 - 1
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverse the order of elements in s between positions i and j (both inclusive). What does the following sequence do, where 1≤k<n:
reverse (s, 1, k);
reverse (s, k+1, k);
reverse (s, 1, n);
Rotates S left by K positions
Reverse all elements of S
Leaves S Unchanged
Rotates S left by K+1 positions
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
18 questions
Memory-Mobo-Hard/Software
Quiz
•
University
12 questions
Quizz Internet
Quiz
•
KG - Professional Dev...
10 questions
VR and AR in multimedia applications
Quiz
•
University
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
10 questions
Adobe Photoshop
Quiz
•
University
10 questions
Choose the level of Bloom’s Taxonomy
Quiz
•
University
10 questions
Semiconductores
Quiz
•
University
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
