Earlier quoted context omitted.
In my example I did not say that the first developer is ignorant about performance. I only talked about knowing data algorithms by heart. So let me rephrase this. Isn't it possible that a developer knows about computer performance but at the same time does not know 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 dev…
BFS is a 4 line algorithm that doesn't need to be memorized. I wouldn't trust a developer who can't even reason this out with understanding runtime order complexity. bool bfs(int x) { q = new LinkedList ; q.push(root) while (q.size != 0 && q.peak() != x); return q.size ? true : false; }
Oh, well...