Algorithms on Data Structure and Algorithms related Questions and Answers

Question 1 : 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 2 : In Huffman coding, data in a tree always occur?
1. roots
2. leaves
3. left sub trees
4. right sub trees
View Answer   Discuss with Members

Question 3 : 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 4 : 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 5 : Consider a reference string:
7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 of frame size 4. Using FIFO algorithm, determine the number of page faults.
1. 12
2. 16
3. 10
4. 14
View Answer   Discuss with Members

Question 6 : Consider a reference string:
7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 of frame size 3. Using FIFO algorithm, determine the number of page faults.
1. 12
2. 16
3. 14
4. 15
View Answer   Discuss with Members

Question 7 : In a FIFO algorithm, when a page is to be replaced, which of the following page is chosen?
1. Oldest page
2. Newest page
3. Frequently occurred page in past
4. Frequently occurred page in future
View Answer   Discuss with Members

Question 8 : As the number of frames available increases, the number of page faults decreases.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 9 : Consider a reference string 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 of frame size 3. Calculate the number of page faults using optimal page replacement algorithm.
1. 10
2. 9
3. 8
4. 7
View Answer   Discuss with Members

Question 10 : When all software that runs on a system is known beforehand, optimal page replacement algorithm can be used in a general-purpose operating system.
1. True
2. False
3.
4.
View Answer   Discuss with Members


View 1 - 10 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