Earlier quoted context omitted.
"write out these problems on paper" I write on paper so infrequently that I actually find it pretty difficult to write more than a few words. I certainly wouldn't want to write something out longhand in an interview! Edit: It seems to me it would be rather unfair of me to ask people to write out their thoughts in Org Mode in VS Code just because that's how I happen to like writing notes :-)
Writing speed isn't the bottleneck hopefully :)
Data structures and algorithms I actually used while working at tech companies
81–90 of 547 posts
Re: Data structures and algorithms I actually used while working at tech companies
#82Re: Data structures and algorithms I actually used while working at tech companies
#83Re: Data structures and algorithms I actually used while working at tech companies
#84Earlier quoted context omitted.
"write out these problems on paper" I write on paper so infrequently that I actually find it pretty difficult to write more than a few words. I certainly wouldn't want to write something out longhand in an interview! Edit: It seems to me it would be rather unfair of me to ask people to write out their thoughts in Org Mode in VS Code just because that's how I happen to like writing notes :-)
Writing speed isn't the bottleneck hopefully :)
Re: Data structures and algorithms I actually used while working at tech companies
#85Re: Data structures and algorithms I actually used while working at tech companies
#86Most coding problems can be broken apart and the individual components tackled one by one. But that has two problems. One, it doesn't stress-test the programmer. Two, the most beneficial changes to a codebase come from a high-level understanding of the system. Implementation might be segmented, but the more of the system you can simultaneously understand & manipulate in your head, the better placed you are to manipulate the architecture.
Complex algo questions force you to manipulate a fundamentally complex problem. You can break it apart in some ways, but in general you have to be able to think about the entire basic algorithm in your head. Reversing a binary tree? You have to be able to visualise the datastructure you're manipulating and figure out what changes you need to make before you start writing. It's a stress test, it tests horsepower.
Granted, you can game that system by doing practice questions which undermines it to an enormous degree but I'm not sure what else you can do to test that.
Re: Data structures and algorithms I actually used while working at tech companies
#87Let's say someone can solve the algo problem, what's that show? Mostly that they prepared for an algorithms question. It may be a good filter for 3rd-wave do-as-you're told programmers who stay in their lanes, produce by the book expected code, and just consistently obediently build things. They wan better cogs for the corporate software machine. If people are asking me algo questions, the job probably isn't right fo…
Re: Data structures and algorithms I actually used while working at tech companies
#88Earlier quoted context omitted.
It's a great showcase of how a flashy looking solution is the wrong approach. A good candidate will know it can be written in 2 lines recursively, but that the stack will explode with a fairly low term number, and that iterating with a for loop is more efficient.
In eg Python you can just add a memoization decoration, and get a linear solution from the naive recursive one. That's pretty neat.
Re: Data structures and algorithms I actually used while working at tech companies
#89IMHO take home tests with a following discussion of the solution is the best way to go. Interviewers can judge the code quality as well as critical thinking with the follow up discussions.
Re: Data structures and algorithms I actually used while working at tech companies
#90Earlier quoted context omitted.
How do you figure from a Fibonacci exercise that the candidate understands recursion? It's 5 lines of code to memorize.
By the way they discuss the implementation. First level is ensuring that base cases are covered (i.e. correct implementation of recursion) Second level is how they explain the simple recursion that’ll hit stack limits (i.e. without tail recursion) Third level is using accumulator/tail recursion. See how they can express these ideas and are they able to effectively communicate their intentions.