You can for simple algorithms. It's just really easy for interviewers to overestimate how simple an algorithm is when they have been told the answer.
Yeah, that's exactly the point. These kind of algorithms are far from easy to invent even if they look simple once they are known.
Yeah, that's exactly the point. These kind of algorithms are far from easy to invent even if they look simple once they are known.