|
|
|
|
|
by lesuorac
342 days ago
|
|
Heh, I remember an interview once and they wanted me to figure out if a word contained double letters (i.e. there's 2 L's in letters). I was like well I'd probably just make a Set in Java and insert letters until it has a duplicate. They didn't like that. So I was like well I guess I can make a double for-loop and check that way and they liked that ... It is weird how people like you to re-invent the wheel as opposed to just import one. |
|
One is domain knowledge which is less important in the age Google search and StackOverflow (and even less so in the age of LLMs but I guess interview techniques haven't caught up yet).
The second is the ability to understand a nested for loop, and if a coder can't do that by the point they reach an interview, it can probably never be taught.
It could be argued that being able to think up using a set in this instance is also an important skill, and I agree. But nested for loops are foundational skills, if the interviewee has problems there it's a good thing to know about early.
It could also be argued that they should just say directly "solve this using loops" if that's what they want, and well, yeah.