Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Answer / sandeep vimal
No.
Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesn’t mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is hashing with example?
I am given a sequential algorithm that does a routine search on an unordered list. N = 20. The probability that the value x does NOT appear in the list is exactly 60%, and the probability that x DOES appear is 40%. The 3 questions that I could not get were: A) What is the avg number of element comparisons performed when n = 20 and x does NOT appear in the List. (my answer was 20, is this correct?) B) What is the avg number of element comparisons peformed when n = 20 and x DOES appear in the list? C) What is the avg number of element comparisons performed when n = 20. This should be a single number answer they said.
What is top in stack?
What is subtree?
When will you use array over arraylist?
Is linkedlist thread safe?
What is the difference between Strings and Arrays?
Explain the Queue
What is difference between hashmap and hashset?
Are the expressions arr and &arr same for an array of integers?
What is link list in data structure?
Differentiate bfs and dfs?