Skip to main content
Tweeted twitter.com/StackMma/status/1136422582834618372
Became Hot Network Question
edited tags
Link
user64494
  • 29.1k
  • 4
  • 29
  • 56
Source Link
user64494
  • 29.1k
  • 4
  • 29
  • 56

Certain search in list

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.