Can You Solve This?
Today when I was riding the bus I thought “would it be possible to efficiently utilize the seats so that each individual would sit as long as possible?”. The short answer is for reality is probably “NO!” but let’s have fun with the problem in theory at least :) Let’s say that we have a bus route with 50 stops and the distance between each consecutive pair is constant. The bus has 20 seats (Let’s focus on one bus for now). Then at each stop (including the terminals) we get the data on how many people are getting on and at which stop they’re getting off. At each stop tell each passenger to sit (optionally) or let them stay standing by default. ...