Netflix | Find target word in an infinite list of words
Anonymous User
8903

My friend got asked this question during his interview with Netflix!

Imagine that you have an infinite sorted list of words. Assuming that your word of interest (targeted_word) is at the K position (K is very large). You start at the position x (x less than k). If word[x] < targeted_word, then you move x/2 position, i.e. x = x + x / 2. What is the complexity in term of K. If it is in a log form, then what is the base of the log.

I'm not sure whhat is the right answer here!

Comments (8)