
Data Structure tree and graph
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Hard
Arshad Ali
Used 2+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Convert the postfix expression,into its correct infix form.
Expression:876-4*/83*+4+5/
((8/((7−6)∗4))+(8∗3)+4)/5
(8/(7−(6∗4))+(8∗3)+4)/5(8 / (7 - (6 4)) + (8 3) + 4) / 5(8/(7−(6∗4))+(8∗3)+4)/5
(8/((7−6)/4)+8∗(3+4))/5
((8/(7−6))∗4+(8∗3)+4)/5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the maximum number of nodes at level k in a binary tree?
2^k-1
2^k
2k
k^2
3.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
what will be the output of above code if the binary search tree values are [50 30 40 20 10 70 60 80 90] low=30 and high=90
[30,40,50,60,70,80]
[80,70,60,50,40,30]
[30,50,70,90]
[40,60,80]
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
A social media platform wants to recommend friends to its users based on common interests. The platform represents users as nodes in a graph, and the friendships between users as edges. The recommendation algorithm aims to suggest friends who have a high number of mutual friends.Which algorithm is most suitable for recommending friends based on mutual friends in the graph?
Breadth-first search (BFS)
Depth-first search (DFS)
Dijkstra's algorithm
Kruskal's algorithm
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Given a BST(Binary Search Tree) with values 10,50,150,37,7 and minVal=-9999 maxVal=9999 what is the functionality of the following code
Checks largest child node in the BST
Checks the root element is maximum or minimum
Checks all the BST values are within minVal to maxVal
Checks the given BST is valid BST or not
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Below code finds the Kth smallest number in the binary search tree. But the code contains small logical faults that prevent it from producing the required results. To obtain the output, correct the code
condition:if (count != k) should be changed to if (count < k)
condition:if (count != k) should be changed to if (count >=k)
condition:if (count != k) should be changed to if (count == k)
condition:if (count != k) should be changed to if (count > k)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when the root node is deleted from a BST?
Tree becomes invalid
Only the left subtree survives
The entire tree is deleted
It must be replaced with a node from a subtree
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
Already have an account?
Similar Resources on Wayground
20 questions
AISB223 Chapter 12: Confidentiality and Privacy Controls
Quiz
•
University
15 questions
Understanding Loops in C Programming
Quiz
•
1st Grade - University
20 questions
SYBAF Internal Practice Test
Quiz
•
University
20 questions
Unit-1 Introduction to Cloud Computing
Quiz
•
University
18 questions
2.2 Data Transmission
Quiz
•
University
14 questions
CHAPTER 6: SYSTEM ANALYSIS AND DESIGN
Quiz
•
University
10 questions
NoSQL Concepts
Quiz
•
University
18 questions
Quiz 02-Finals-IT 222-FIAS
Quiz
•
University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
