Sort jobs by profit (descending). For each job, schedule it in the latest available slot before its deadline. Why latest? It leaves earlier slots free for jobs with tighter deadlines.
This maximizes flexibility. Use a slot array to track which time units are taken. Time: . Space: .