If this activity has start time greater than or equal to the finish time of previously selected activity , then select it
if ( arr [ j ] [ 0 ] >= arr [ i ] [ 1 ] ) { selected . push ( arr [ j ] ) ; i = j ; } } return selected ; }