0 votes
1 answer
91
The cost of optimal binary search tree for the identifier set $(a1, a2, a3) =$ (do, if, while) with $p(1) = 0.3, \ p(2) = 0.2, $ $p(3) = 0.15, q (0) = 0.05, q(1) = 0.15...
2 votes
2 answers
93
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
2 answers
94
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.
0 votes
1 answer
95
Consider the following instance of the knapsack problem :$\begin{array}{|c|c|c|c|c|c|} \hline \text{Item} & a & b & c & d & e \\ \hline \text{Benefit} & 15 & 12 & 9 & 16 ...
0 votes
1 answer
96
Let $T$ be a rooted ternary tree where each internal node of $T$ has a maximum of $3$ children. If root is at depth $0$, then maximum total number of vertices $T$ can hav...
0 votes
3 answers
97
Given $n$ number of linearly ordered distinct elements, what will be the worst case time complexity to find$p$-th smallest element $(1 \leq p \leq n)$ from these $n$ elem...
1 votes
1 answer
100
The number of comparisons required to find the maximum and minimum element in an array $A[n]$ using Divide and Conquer method is:$(3n/2)+ 2$$(3n/2) - 2$$3n$$3n/2$
2 votes
1 answer
101
Consider the following Graph G: The number of minimum cost spanning trees using Kruskal's Algorithm is _________ .
0 votes
1 answer
102
A hash table of length $7$ uses open addressing with hash function $h(k) = k \text{mod }7$ and linear probing to resolve collisions.After inserting 6 values in an empty h...
0 votes
3 answers
103
1 votes
1 answer
104
Which of the following are TRUE?$n! = \theta ((n + 1)!)$$\log4 n = \theta ( \log2 n )$$\sqrt{\log n} = O(\log \log n)$(i) & (iii) only(i) & (ii) only(ii) only(i),(ii) ...
0 votes
1 answer
105
Consider the following max-heap as given below : 9 / \ 6 8 / \ / \3 4 5 7The number of swaps required to convert the given max-hea...
0 votes
2 answers
106
The length of the longest common subsequence of $L = ( 1,0,0,1,0,1,0,1 )$ and $K =( 0,1,0,1,1,0,1,1,0 )$ is __________.
2 votes
2 answers
107
Match the following:$\begin{array}{|l|l|l|l|} \hline (1) & \text{Multistage graph} & (P) & \text{Divide and conquer}\\ \hline (2) & \text{Convex hull } & (Q) & \text{Dept...
1 votes
2 answers
108
Which one of the following is a topological sort for the above graph?$1, 6, 2, 5, 3, 4$$4, 5, 6, 3, 2, 1$$2, 4, 5, 6, 3, 1$$6, 4, 5, 2, 1, 3$
0 votes
1 answer
109
The time complexity of the function mentioned below is:void f(int k[], int n) { int i; printf("%d",n); for(i=0; i<n; i++) { printf("%d",k[i]); } printf("n"); }$O(n^2)$$O(...