Question
Which algorithm is a greedy algorithm used to find the
Minimum Spanning Tree (MST) of a graph by repeatedly adding the smallest weight edge that connects two disconnected components?Solution
Kruskal's Algorithm is a greedy algorithm for finding an MST. It sorts all the edges in non-decreasing order of their weights and then adds edges one by one to the MST if they do not form a cycle with the already added edges. Prim's Algorithm is also greedy but builds the MST by growing a single component.
The average marks of 30 students in Class I is 60. The average marks of some students in Class II is 75. When all students of both classes are taken tog...
5 positive numbers are written on a piece of paper. Sum of first 3 numbers is 55 and ratio of the 4th and the 5th number is 2:3. If difference between t...
The average marks scored by 20 boys and 45 girls are 88 and 94 respectively. Find the average marks scored by all the students together. (Answer should ...
The average expenditure of a man for the first 7 month is Rs.5000 and for the next 5 months is Rs.8000. If he saves 12000 in that year then find his ave...
In an examination the average marks of Rohit is 55. If he got 15 more marks in science and 27 more marks in maths then his average would have been 61. F...
In 40 matches, Mia had a bowling average of 18.6. She played 3 more matches, took 3 wickets after conceding 162 runs, and her average increased by 1.8. ...
What is the overall average of marks for all the students if three groups consist of 45, 35, and 40 students with average marks of 40, 60, and 45, respe...
In a team of 25 players, the average age is 26 years. One player aged 24 left and five new players with an average age of 28 years joined. When the coac...
The average weight of 15 oarsmen in a boat is increased by 1.6 kg when one of the crew, who weighs 42 kg, is replaced by a new man. Find the weight of t...
The average of the present ages of Arun, Mohan, and Deepak together is 30 years. Five years from now, the sum of the ages of Mohan and Deepak will be 66...