Halloween Sale
Unlock all premium questions for over 30% off
Binary Search Floor Variation
Medium
Question
You get array, a list of integers in sorted order that can contain repeated values, together with a number target. Write a binary search over it with two possible outcomes. If target can be found, the answer is the smallest index holding it. When it does not occur, return the position of the element nearest to target among those that are not larger than it.
...
Asked at:Microsoft
More Microsoft interview questions
- Find Grid Word Pathmedium
- Calculate Total Round-Robin Waiting Timemedium
- Recipes From Available Ingredientseasy
- Longest Proper Prefix And Suffixmedium
- Minimum Flips for Symmetric Gridmedium
- Largest Square from Mixed Tilesmedium
- Maximize Edge Label Sum in Graphmedium
- Set Even Parity Biteasy
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.