cs502 Midterm Solved Mcqs by Me
cs502 Midterm Solved Mcqs by Me
38. In In-place sorting algorithm is one that uses no additional array for storage.
39. The main shortcoming of counting sort is that it is useful for small integers
1 5
1.618
The original recursive algorithm takes ( ) time, where
n
40. 2
41. The Huffman codes provides a method of encoding data which is efficient and use fixed length codes i.e. ASCII
42. Using ASCII standard the string “adacdaacac” will be conceded with 8 bytes
43. In undirected graph there is convention of only back edges
44. In time stamp traversal we can calculate whether the graph has cycles
45. Precedence constraint graph is acyclic directed graph
46. In Prim’s algorithm, the additional information maintained by the algorithm is
The length of the shortest path from vertex v to the vertex u
47. In strongly connected components the component graph is necessarily cyclic
48. Floyd-Warshal algorithm is based on dynamic programming approach and allow negative edges
overall ( E log E ) and for sparse graph ( E log V )
49. Kruskal’s algorithm has time complexity
50. In NP-Problems “NP” represents Non-deterministic polynomials
51. Generalize coloring problem arises in various partitioning problems where there is a constraint
That two objects cannot be assigned to the same set of partitions and is belong to NP class
52. Sieve technique can be applied to solve selection problems
53. Usually which type of algorithm is harder to prove the correctness? Brute force
54. Flowchart is a graphical representation of an algorithm
it will take ( I )
55. When we call heapify then at each level the comparison performed takes time?
56. Who invented quick sort procedure? Hoare
57. If we encode and compress text using ASCII standard each character is represented by, Fixed length code word of 8 bits
58. The Huffman coding used, Prefix property that no code word is prefix of any other code
59. In directed graph the cardinality of edges |E| =
Sum of out=degree of all the vertices
Sum of in-degree of all the vertices
60. A Hamiltonian cycle is a cycle, that visit every vertex in the graph exactly once
61. In generic graph traversal algorithm we, put edges in the bag data structure
62. The generic graph traversal algorithm stores a set of candidate edges in some data structures we well call a “bag”
63. Dijkstra’s algorithm:
The length of the shortest path to the start vertex is always zero.
It will work on any weighted graph with positive weights.
The running time of Bellman- Ford algorithm is greater than Dijkstra’s algorithm
64. Kruskal’s algorithm is used for calculating minimum spanning tree.
65. Dijkstra’s algorithm is used for single source shortest path problems
66. Floyd-Warshal algorithm dates back to the early 60’s
(n 2 )
67. Space used by Floyd-Warshal algorithm is
101.