Driver code
Activity = [ [ 5 , 9 ] , [ 1 , 2 ] , [ 3 , 4 ] , [ 0 , 6 ] , [ 5 , 7 ] , [ 8 , 9 ] ] NEW_LINE n = len ( Activity ) NEW_LINE selected = MaxActivities ( Activity , n ) NEW_LINE print ( " Following ▁ activities ▁ are ▁ selected ▁ : " ) NEW_LINE print ( selected ) NEW_LINE