You might also be able to find a solution fromAI solution orcommunity posts

BFE.dev solution for JavaScript Coding Question
50. search element right before target with Binary Search(possible duplicate array)

No solution yet, but you can request it.
We are adding solutions based on the requests.