Join Slack
Powered by
Is my guess correct, that there is no left/right v...
# stdlib
g
ghedeon
04/19/2025, 5:22 PM
Is my guess correct, that there is no left/right versions of binary search in kotlin that can deal with duplicates, the way it's supported in python (
bisect_left
,
bisect_right
)? Sad java Collections legacy
k
Klitos Kyriacou
04/22/2025, 5:16 PM
I think you are correct, but it should be easy enough to write your own version of both of those functions using Kotlin's
binarySearch
followed by a short sequential search from that point.
2
Views
Open in Slack
Previous
Next