Dial's Algorithm Quiz With Ans Key
Dial's Algorithm Quiz With Ans Key
A. Robert B. Dial
B. Edsger Dijkstra
C. Alan Turing
D. John von Neumann
Answer: A
A. Priority queue
B. Stack
C. Buckets
D. Binary heap
Answer: C
A. Node
B. Edge
C. Bucket
D. Edging
Answer: B
DIAL’S ALGORITHM QUIZ
6. What is a bucket in Dial's Algorithm used for?
A. Storing all graphs
B. Grouping vertices by their current distances
C. Representing the maximum range of edge weights
D. Storing processed dictionaries
Answer: B
7. In Dial's Algorithm, what is the initial distance of all vertices except the source?
A. Zero
B. One
C. Negative infinity
D. Infinity
Answer: D
8. What does the term "relaxation" mean in the context of shortest path algorithms?
A. O(n)
B. O(nW)
C. O(n2)
D. O(m)
Answer: B
DIAL’S ALGORITHM QUIZ
11. What is the time complexity of Dial's Algorithm?
A. O(n2)
B. O(n+m)
C. O(n log n)
D. O(m log n)
Answer: B
14. How does Dial's Algorithm handle large edge weights efficiently?
15. What does the "addEdge" function do in the Python implementation of Dial's
Algorithm?
17. What is the main difference between Dijkstra's Algorithm and Dial's Algorithm?
18. Which function removes and returns the first element from a list in Python?
A. .append()
B. .pop()
C. .remove()
D. .clear()
Answer: B
A. Sorting integers
B. Calculating shortest paths in road networks with small edge weights
C. Generating random numbers
D. Encrypting data
Answer: B
20. Why is Dial's Algorithm unsuitable for graphs with large edge weight ranges?