Algorithms on Data Structure and Algorithms related Questions and Answers - Page 5

Question 41 : Fractional knapsack problem can be solved in time O(n).
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 42 : Given items as {value,weight} pairs {{40,20},{30,10},{20,5}}. The capacity of knapsack=20. Find the maximum value output assuming items to be divisible.
1. 60
2. 80
3. 100
4. 40
View Answer   Discuss with Members

Question 44 : What is the running time of the Huffman algorithm, if its implementation of the priority queue is done using linked lists?
1. O(C)
2. O(log C)
3. O(C log C)
4. O(C2)
View Answer   Discuss with Members

Question 45 : How many bits are needed for standard encoding if the size of the character set is X?
1. log X
2. X+1
3. 2X
4. X2
View Answer   Discuss with Members

Question 46 : The result of the fractional knapsack is greater than or equal to 0/1 knapsack.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 47 : Given items as {value,weight} pairs {{60,20},{50,25},{20,5}}. The capacity of knapsack=40. Find the maximum value output assuming items to be divisible and nondivisible respectively.
1. 100, 80
2. 110, 70
3. 130, 110
4. 110, 80
View Answer   Discuss with Members

Question 48 : What will be the cost of the code if character ci is at depth di and occurs at frequency fi?
1. cifi
2. ∫cifi
3. ∑fidi
4. fidi
View Answer   Discuss with Members

Question 50 : What is the running time of the Huffman encoding algorithm?
1. O(C)
2. O(log C)
3. O(C log C)
4. O( N log C)
View Answer   Discuss with Members


View 41 - 50 of 55 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter