Suppose you are given the following set of activities with their associated (sta
ID: 3786521 • Letter: S
Question
Suppose you are given the following set of activities with their associated (start time finish time) pairs A=(12, 20) B=(1, 18) C=(4, 8) D=(14, 19) E=(3, 6) F=(22, 27) G=(16, 24) H=(17, 23) I=(2, 10) J=(21, 25) K=(7, 13) L=(12, 15) What schedule is produced by the greedy-by-activity-length algorithm (shortest activities first) for Activity Scheduling? Enter your answer in EXACTLY the following format a listing of the activities chosen in increasing order by start time(i.e. left-to-right in the schedule), in upper-case, separated by commas, with no spaces. For example your answer might be something like. A, F, C, JExplanation / Answer
for sorting big oh : O(n log n) .... to get sortest activity
for selection big oh : O(n) .... to select least activity first and to remove overlappings
So overall big oh for algo will O(n log n)