You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a Set with elements (10,20,30,40,...) we need to find the next smallest and next largest element (both inclusive), e.g. nextSmallest(25) = 20, nextLargest(25) = 30.
Given a TreeMap this can be quickly done by traversing the tree. Sadly to achieve this in Scala 2.11 you have to copy the code of the TreeMap and RedBlack-classes.
On the other hand the next largest element can now be efficiently found using iteratorFrom introduced by #6642.
There should be a simple way to find the next smallest element, for example by introducing a reverseIteratorFrom.
The text was updated successfully, but these errors were encountered:
Given a Set with elements
(10,20,30,40,...)
we need to find the next smallest and next largest element (both inclusive), e.g.nextSmallest(25) = 20, nextLargest(25) = 30
.Given a TreeMap this can be quickly done by traversing the tree. Sadly to achieve this in Scala 2.11 you have to copy the code of the TreeMap and RedBlack-classes.
On the other hand the next largest element can now be efficiently found using iteratorFrom introduced by #6642.
There should be a simple way to find the next smallest element, for example by introducing a
reverseIteratorFrom
.The text was updated successfully, but these errors were encountered: