find / filter / some / every Playground

Sri searches the train with find, findIndex, filter, some and every, each call the engine made logged, then a binary search that halves the train: what if the…

The key idea

Same question: pick the method by the shape of answer you need

Try it in this playground