Professional Documents
Culture Documents
2
Activity-Selection Problem
• Here are a set of start and finish times
4
Activity-Selection Problem
5
An Iterative Approach
• The recursive algorithm is almost tail recursive (what is that?) but there is a
final union operation
• We let fi be the maximum finishing time for any activity in A
• The loop in lines 4-7 stops when the earliest finishing time is found
Websites:
• https://www.tutorialspoint.com/data_structures_algorithms/kruskals_spanning_tree_algorithm.htm
• https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-algorithm-greedy-algo-2/
THANK YOU