Question 1 | MCQ
Solution
Solution
Solution
Solution
Solution
Solution
Solution
Solution
Solution
Solution
Consider a undirected connected graph G, where each edge contains the equal weight 1. Which one of the following istrue?
Solution
The maximum and minimum number of nodes in a binary search tree of height 7 are__________. Consider that the height of the empty tree is 0.
Solution
Consider a complete binary tree with n nodes, where the left and right subtrees of the root are max heaps. The upper bound to convert the tree to a max heap by an efficient algorithm is __________.
Solution
Solution
Which of the following statement(s) is/aretrueabout Huffman code algorithm?
1. In an optimal Huffman tree, if leaf labelledxis at depth smaller than leaf labelledy, then
frequency(x) >= frequency(y)
2. Huffman code algorithm always generates prefix code.
3. Huffman code algorithm is based on a greedy approach.
1. In an optimal Huffman tree, if leaf labelledxis at depth smaller than leaf labelledy, then
frequency(x) >= frequency(y)
2. Huffman code algorithm always generates prefix code.
3. Huffman code algorithm is based on a greedy approach.
Solution
Solution
Solution
Which of the following option represents the fail function (or prefix function) for pattern 'abababaa'in the Knuth-Morris-Pratt (KMP) algorithm?
Solution
Solution
Solution
Solution
First kind of cake requires 200g of flour and 25g of fat, and second kind of cake requires 100g of flour and 50g of fat. Formulate this problem as a linear programming problem to find the maximum number of cakes that can be made from 5 kg of flour and 1 kg of fat, assuming that there is no shortage of the other ingredients used in making the cakes.
The above problem is to be formulated as a linear programming problem. Let x and y be the number of cake of kind first and second, respectively. Objective function to maximize the number of cakes z = x + y.
Which of the following isnot a validconstraint for the given problem?
The above problem is to be formulated as a linear programming problem. Let x and y be the number of cake of kind first and second, respectively. Objective function to maximize the number of cakes z = x + y.
Which of the following isnot a validconstraint for the given problem?
Solution
Which of the following statement(s) is/aretrue?
Solution
Solution
Consider aundirected graph Gwith65edges with the least number of vertices possible. What will be the number of vertices in graphG?
Solution
Solution
Solution
What will be the minimum number of nodes in an AVL tree of height9? Consider that the height of the empty tree is 0.
Solution
Solution
Solution
Solution
Shape
Thickness [ / ]
3
All colors