by kkapelon · 10y ago · 0 comments
So let me rephrase this. Isn't it possible that a developer knows about computer performance but at the same time does not know <insert your favourite algorithm here> by heart?
Do you really think that "knowing BFS by heart" equals "knowing everything there is to know about computer performance"?
In your scenario, a developer might just google BFS if that is really needed (when a custom component is needed). Is this so important that he/she has to know BFS by heart beforehand during the interview?
bool bfs(int x) {
q = new LinkedList<Node>;
q.push(root)
while (q.size != 0 && q.peak() != x);
return q.size ? true : false;
}Oh, well...