Using the elevator algorithm for processing disk requests, suppose requests arrive in the order: 8, 36, 34, 12.... (These numbers are cylinder numbers). Suppose the direction is UP meaning that the arm is taking on higher requests. Here we can see that both 36 and 34 are higher requests but 36 comes before 34, So, I'm confused if the algorithm addresses shortest distance between consecutive higher requests, because it was not addressed in the algorithm.
The idea is that you guarantee that every request will be satisfied eventually by moving in one direction until there are no further requests in the same direction. The arrival order doesn't matter as much as the arrival times - any first request to an otherwise empty queue is scheduled immediately and set the direction. When that request is satisfied, look for additional requests in the same direction, then if none, reverse direction.