Conversation

So am I correct that there is no equivalent of bsearch in Javascript for Arrays? E.g. no standard library bsearch? Is there any plausible reason for this absence?
7
6
Replying to
The high-level approach is a sorted map and set type abstracting it into a container type. Manually sorting an array and passing it to a function assuming that the input is genuinely sorted is a very low-level approach. It's not common in high-level languages in general.
1
3