← Microsoft questions

Binary Search Implementation

Filed under Microsoft · Also reported at Amdocs, Bank of America, IBM, Nokia, Oracle, Sandvine, VMware, Wissen

Given a sorted array of integers and a target value, write a function to return the index of the target if it is present. If not present, return -1 using binary search.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.