Google question circa 2017 that has always puzzled me, not sure if there's enough info now to solve it but here's what I had from my notes..
Given a sorted array of size 8 find the first occurrence of when a number occurred greater or equal than 25% of the time.
First off I engaged on the problem being a const size, thus O(1) even for an iterative solution. Doing things like binary search wouldn't make time complexity better than O(1) and would even run worse in real time due to CPU pipelines. He didn't like that. I mentally conceded and asked him if he thought I should do a modified binary search for n & n+1 target values and he seemed to not like that either.
Think I spent the rest of the interview getting tilted trying to read this guys mind on what he wanted with out being able to tease out of him what he wanted. At the end he gave me some hints, when it was too late, about splitting the array into 4 partitions, to get Log(N) time.
Was I wrong to push back on complexity-analysis?
Can you solve it in Log(N), ignoring const 8, with partitions?