Google Phone screening round

google logo
google
May 7, 20253 reads

Summary

I had a phone screening round with Google, where I was presented with a unique data structures and algorithms question regarding binary search in an unsorted array.

Full Experience

Given an unsorted array, find out the numbers that are always findable if we apply binary search. Also instead of middle function, we are given f(l,r) which can return any index which lies in a range.

Input : 2,1,3,5,0,6 Output he told me to come up with. So I am not sure what is the correct answer

Interview Questions (1)

Q1
Binary Search in Unsorted Array with Custom Midpoint Function
Data Structures & Algorithms

Given an unsorted array, find out the numbers that are always findable if we apply binary search. Also instead of middle function, we are given f(l,r) which can return any index which lies in a range.

Input : 2,1,3,5,0,6

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!