You are given n events where each takes one unit of time. Event i will provide a profit of gi dollars (gi > 0) if started at or before time ti, where ti is an arbitrary real number. (Note: If an event is not started by ti then there is no benefit in scheduling it at all. All events can start as early as time 0.) Given the most efficient algorithm you can to find a schedule that maximizes the profit