For example, take red-black trees. How do they work? Most of the time, I shouldn’t have to care. If you need one, every language has an excellent pre-written, well tested, high performance library that you can just use. The important skill is not being able to recreate this library, but knowing how to spot when you can use it profitably to solve a bigger problem, whether it is the right tool, how this will fit into the time or space complexity of your overall solution, etc
And that is exactly why I never ask anyone to implement basic data structures in interviews. Nor would I want to work with anyone who does (unless the work was designing language features).
even if they will never have to write this kind of code on the job
Or, you could kill two birds with one stone and have them code something that they would potentially do on the job.
Here's my code for implementing a hash map in Java:
import java.util.HashMap;
Does that mean that I know how one works, or when and why I should use one? Who knows? Maybe those would be better questions for a candidate than asking them to reinvent the wheel within an artificial time limit.
shareholders are paying me to solve "complex" business problems not to do my phd in cs or discrete maths.
I 'm downvoted probably from people that used btree and red black (or whatever these trees are called) in their work environment. Jesus, we're in 2021 especially in the front end half of all devs in my recent jobs didn't have a cs degree. Most of them were self taught or did sth else with their lives
Still downvoted without reason except the obvious fact that any java team leader would rather choose a candidate that knows the java (or maybe I'd rather say spring) ecosystem than someone who knows about btrees.
26
u/Roachmeister Jan 24 '21
And that is exactly why I never ask anyone to implement basic data structures in interviews. Nor would I want to work with anyone who does (unless the work was designing language features).