⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 30s17 days 22 hours 19 minutes 30 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 30s17 days 22 hours 19 minutes 30 seconds.

Sign in to watch this lesson
Advanced - Greedy and Scheduling · 4:18
One machine, a queue of jobs, and a penalty for every moment a job waits. An adjacent swap changes the total by c_i·t_j − c_j·t_i, so the optimal order sorts by c/t (Smith's ratio rule), compared exactly as integer products. The same argument covers exponential and identical penalties, and a theorem of Livshits and Kladov says those three families are the only ones a sort can solve.