I try to solve the following problem.
On $n$ parallel railway tracks $n$ trains are going with constant speeds $v_1$, $v_2$, . . . , $v_n$. At time $t$ = 0 the trains are at positions $k_1$, $k_2$, . . . , $k_n$. Give an $O(n\log n)$ time algorithm that detects all trains that at some moment in time are leading.
The problem is I don't know how to approach the above problem. I assume it's should very popular problem in computational geometry. I saw it few times before, but never considered to solve it.
It looks like that the problem assumes preprocessing the data before giving input the moment of time.
Complexity $O(n\log n)$ points out to process similar to sorting.