Earlier quoted context omitted.
Google tries to keep interview questions confidential - that's why candidates sign an NDA - and periodically rotates out questions that have appeared in public. Many engineers are also continually trying to think up new questions as well, usually based on their work. For most questions, there's no "right" answer, but there are a set of points that the interviewer wants to see you touch on. For example, they might fir…
What about when you know what the concept of big O is, know why it's often touted as important, and disagree that it's as important as it's touted? My opinion is that big-O often ends up being used as a premature optimization effort hindering "just get the right answer first". Maybe that brute force method will work in a reasonable clock-time cost, despite having egregious algorithmic cost. You won't know if you're b…
Any sort of technical solution given at a Google interview would generally have the following questions:
1) What big O time does this algorithm run in? Why? What big O space requirements does it take.
2) If space were more/less expensive, or time more/less important, how would you change the solution and why?
Understanding those tradeoffs and being able to analyze code at that level is a big part of most software engineering jobs.