3 ms·
Maybe it is worth pushing 'pause' on my list of project ideas and just spend a month or so memorizing all the different sort algorithms etc.
by divbit 10y ago
Maybe it is worth pushing 'pause' on my list of project ideas and just spend a month or so memorizing all the different sort algorithms etc.
- Ar-Curunir 10y agoThere's just three sorting algorithms anyone cares about, and they're not particularly complex. Someone with a math background should be able to pick them up in a few hours at most.
- divbit 10y agoProbably useful to cut it down as much as possible.
- douche 10y agoAnd outside of interviews, you will, with high probability, never, ever, have to code one yourself. You'll just call sort(), or OrderBy(), and rely on the battle-tested and bullet-proof standard library implementation.
- divbit 10y agoExactly, I used python heavily for a while, so don't think I've ever even coded my own for anything 'real' (e.g. outside of project euler or something) - I think the closest I've done on a real project is to code the comparison function and feed that to a sort.
- Scea91 10y agoMaybe, but I had to implement Hoare partition scheme which is used in Quicksort a few months ago. If I didn't know Quicksort I wouldn't probably have an idea that this algorithm existed.
- geebee 10y agoI had to write my own tree traversal once. If I didn't know about trees, I wouldn't have had the basic context to do this. But I did have to spend a few hours looking up and refreshing my knowledge of tree traversal. If I'd taken a technical interview exam on tree traversal prior to that four hours or refreshing my memory, I almost certainly would have failed. And yet I within the day I was able to write the code.
- Ar-Curunir 10y agoThat's at least partially because you knew where to look; you'd already learnt the material at some point, so you knew what to be looking for.
- geebee 10y agoAgreed - my point is that I would be rejected from a job in the morning for an inability to write code that I'd be able to write by that afternoon. They aren't testing whether you can look it up and do it, they're testing whether you have it all loaded into short term memory, on the spot. Like a lot of people, I'm tired of having to reload it all and essentially retake my data structures exam. A lot of us just don't want to interview anymore. I know that if I need to, I can write a BFS or find all permutations of a set. If the opportunity is good enough, sure, I'll study up and get ready to do this at a whiteboard, but it's boring and unpleasant at this point, and I might not get or want the job, so at this point, I rarely bother. Tech interviews are a big part of why tech companies are experiencing a "shortage" of applicants. They're hardly the only reason, but I'm pretty convinced they are a reason.
- clarry 10y agoEven if you had to, the algorithms are so darn well documented there's no need to keep the details in your head. If you really need to implement one, you look up the details.