NEW
Font size
WorksheetsMultiple-Choice Quiz: Algorithms Lab 2
Total questions: 10
Worksheet time: 5mins
What is the time complexity of the standard matrix multiplication algorithm?
O(n)
O(n²)
O(n³)
O(2ⁿ)
What is the output matrix size when multiplying two matrices of size n × n?
n × n
2n × 2n
n × 2n
It depends on the input
If matrix A has dimensions 3 × 4 and matrix B has dimensions 4 × 2, what will be the dimensions of the resultant matrix C?
4 × 4
3 × 2
4 × 2
3 × 4
What will be the value of C[1][1] after multiplying the following matrices? A =[1 2 3 4] B =[2 0 1 3]
3
4
5
7
Which of the following is an efficient way to represent a graph with a large number of edges (dense graph)?
Adjacency List
Adjacency Matrix
Edge List
DFS Tree
Which of the following is NOT a valid type of graph?
Directed Graph
Weighted Graph
Unsorted Graph
Cyclic Graph
Which graph representation is best suited for sparse graphs (few edges)?
Adjacency Matrix
Adjacency List
Both are equally good
None of the above
In an adjacency matrix representation of a graph, what does the value matrix[i][j] = 1 signify?
There is an edge from node i to node j
There is no edge between i and j
There is an edge from node j to node i
The graph is undirected
Which of the following data structures is most commonly used to implement an adjacency list?
2D Array
Queue
Linked List or Vector
Stack
What is the space complexity of an adjacency matrix representation for a graph with V vertices?
O(V)
O(V²)
O(E)
O(V log V)
