|
|
|
|
|
by brudgers
4269 days ago
|
|
If the company is writing embedded systems, then purchasing a library will probably make more sense than rolling up a complete linked list implementation. If there are weird constraints to the point where reversing the linked list justifies writing special code, then any assumption that the linked list is the right data structure is worthy of doubt. The truth is that in a few hours, looking at some of the code base and discussing it is going to give both parties a better feel for the fit of person and job than anything else. The interviewer gets a feel for how the candidate will deal with the mess that is someone else's code and build process and the candidate gets a better feel for the mess they will be dealing with. |
|
Don't PL developers need to implement things like List.reverse() in their new languages all the time?
Rhetorical question, because I know the answer is yes.
Here's an example for Julia: https://github.com/JuliaLang/DataStructures.jl/blob/master/s...
(Note that this algorithm is not an in-place reversal, so it wouldn't have worked for the OP's interview.)