[–] twiceaday 13y ago ↗ This reminds me of the following problem:Given a list of numbers, for each number n print (n, k) where k is the first number following n that is larger than n.There is a linear solution
1 comment
[ 5.2 ms ] story [ 15.3 ms ] threadGiven a list of numbers, for each number n print (n, k) where k is the first number following n that is larger than n.
There is a linear solution