A list $LL$ of $n$ real numbers is given. For each element $e$ of $LL$
to find the position of the closest to the right element of $LL$ which is at least twice bigger than $e$ and return it.
If such element does not exist, then {}
should be returned.
How to program that in an optimal way? My search in list-manipulation tagged questions brings nothing and I am not strong in programming so I ask it here.