NEW
Font size
WorksheetsDAA
Total questions: 11
Worksheet time: 6mins
Time complexity of binary search is:
O(n)
O(log n)
O(n log n)
O(1)
Which algorithm uses Divide and Conquer?
Bubble Sort
Merge Sort
Insertion Sort
Selection Sort
A spanning tree connects:
Only some nodes
All vertices with minimum edges
Only leaf nodes
Only cycles
Prim's algorithm starts from:
Any edge
A single vertex
The smallest edge
A random path
Kruskal's algorithm is based on:
Vertex addition
Edge addition in increasing weight order
Depth-first search
Topological sorting
Depth First Search (DFS) uses:
Stack or Recursion
Queue
Heap
Graph matrix
Backtracking is used in solving:
N-Queen problem
Binary Search
Merge Sort
Floyd Algorithm
Which of these problems can be solved using backtracking?
Hamiltonian circuit problem
Knapsack problem
Bubble sort
Binary Search
Dynamic programming is mainly used when:
Subproblems overlap
Problems are independent
No recursion is possible
Randomized solutions are needed
Which of the following uses Dynamic Programming?
Binary Search
Floyd-Warshall Algorithm
Merge Sort
Quick Sort
Dijkstra's algorithm is used to find:
Minimum spanning tree
All pair shortest paths
Single source shortest path
Maximum flow
