4 ms·
Super late responding, but I enjoyed your comment and code. Unfortunately... yes to both your questions. Yes, it is certainly covered in basic undergraduate "D
by geebee 7y ago
Super late responding, but I enjoyed your comment and code.
Unfortunately... yes to both your questions. Yes, it is certainly covered in basic undergraduate "Data Structures and Algorithms."
And yes, I would have trouble writing what you just wrote in 45 minutes at a whiteboard, unless I studied up in advance. I know the algorithm in the back of my mind, and I'd be able to hack away at it. I don't mean in assembly, or in minimal space, I just mean a reasonably efficient implementation of quick sort in a high level language like python ruby or java. Again, I could do this with a bit of study, though I'm no longer inclined to do that study. I can't think of a reason, other than interview exams, for me to front load "into to data structures" into short term memory for a midterm exam one. more. time.
Maybe it does say something about my skill and mind set as a developer, that it would take much longer for me to do this than it would for you. I'm ok with that, as long as we're clear on what "basic" coding means.
I maintain that it is an immensely different thing to say you're weeding out people who don't have basic coding skills when the test is "fizzbuzz" vs "implement merge sort".
- kragen 7y agoWell, I tend to spend a lot of my spare time noodling on what I think of as fundamental CS problems (what's the optimum radix for a min-heap? 3, I think, not 2), and I've spent a fair amount of time programming in languages like C where implementing mergesort from scratch is actually a practical thing to do. And I have a prejudice in favor of knowledge with a significant shelf life, like how mergesort works, rather than, say, how to work around the bugs in the latest version of React, which is also practically necessary for getting stuff done. So I might have a bias in favor of that kind of thing. I certainly agree that mergesort is a lot harder than fizzbuzz, more than an order of magnitude. Fizzbuzz is well under a minute. I'm pleased that you enjoyed my comment and code! I was reluctant to make it because I feared you might interpret it as an attack.