MathWorks Interview Question

Binary search, bit masking was asked.