CS502 Quiz Fundamentals of Algorithms
Question No: 1 ( Marks: 1 ) - Please choose one
Dijkstra’s algorithm is operates by maintaining a subset of vertices ► True
► False
Question No: 2 ( Marks: 1 ) - Please choose one
We do sorting to, ► keep elements in random positions
► keep the algorithm run in linear order
► keep the algorithm run in (log n) order
► keep elements in increasing or decreasing order
Question No: 3 ( Marks: 1 ) - Please choose one
After partitioning array in Quick sort, pivot is placed in a position such that► Values smaller than pivot are on left and larger than pivot are on right
► Values larger than pivot are on left and smaller than pivot are on right
► Pivot is the first element of array
► Pivot is the last element of array
Question No: 4 ( Marks: 1 ) - Please choose one
Merge sort is stable sort, but not an in-place algorithm► True
► False
Question No: 5 ( Marks: 1 ) - Please choose one
A p × q matrix A can be multiplied with a q × r matrix B. The result will be a p × r matrix C. There are (p . r) total entries in C and each takes _________ to compute.► (q)
► (1)
► (n2)
► (n3)
Question No: 6 ( Marks: 1 ) - Please choose one
One of the clever aspects of heaps is that they can be stored in arrays without using any
_______________. Pointers
constants
variables
functions
Question No: 7 ( Marks: 1 ) - Please choose one
Merge sort requires extra array storage, True
False
Question No: 8 ( Marks: 1 ) - Please choose one
The Huffman codes provide a method of encoding data inefficiently when coded using
ASCII standard. True
Falase
Question No: 9 ( Marks: 1 ) - Please choose one
Using ASCII standard the string abacdaacac will be encoded with __________ bits. 80
160
320
100
Question No: 10 ( Marks: 1 ) - Please choose one
Using ASCII standard the string abacdaacac will be encoded with 160 bits. True
False