
Code Uncode 4.0
Authored by Kathan Majithia
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
KMP string matching algorithm runs in?
Answer explanation
Preprocess pattern in O(m), search in O(n). Total linear.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many maximum edges are there in a simple undirected graph with V vertices?
Answer explanation
A Complete graph has exactly V(V-1)/2 edges.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of Bellman-Ford?
Answer explanation
Relax edges V-1 times O(VE). Handles negative weights.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which traversal does not construct a unique BST?
Answer explanation
Inorder + any one traversal (pre/post) uniquely defines BST.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Time to build a heap from n elements?
Answer explanation
Heapify bottom-up costs linear
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Topological sort is possible when the graph is?
Answer explanation
Only DAGs admit valid topological ordering.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the space complexity of recursive DFS on a graph with V vertices?
Answer explanation
Call stack depth up to V in worst case.
Access all questions and much more by creating a free account
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?