4 ms·
I'm going to be snarky but I'll say it anyway: you know, stupid stuff like balanced binary trees and shit like that, when nothing's going to fall apart if the u
by logicallee 10y ago
I'm going to be snarky but I'll say it anyway: you know, stupid stuff like balanced binary trees and shit like that, when nothing's going to fall apart if the user's browser shows a spinning wait animation for 7 seconds (45 seconds at peak times but that happens for just a few hours per week at most) while you iterate through the data sequentially. honestly, who ever needed an algorithm or data structure. /s
(I'm sorry. I thought about using less snark but I can't.)
- gricardo99 10y agoand if you did absolutely have to implement one from scratch, then you probably wouldn't have to spit out an answer on a white board in front of some judging eyes with very limited time and push that into production.
- adrianN 10y agothe last time i had to implement a datastructure was in class. on the job i use the standard library. i hope you do the same.
- logicallee 10y agoBut rolling a standard datastructure (and what's the "standard library" for a red-black tree anyway - in Python, or in Java? - or C++ for that matter) proves that you can do something "tricky" and hopefully get it right. You can understand and reason about what you're doing. If they don't let you Google while doing a "CS" type problem, of course, then they're insane. When it comes time to do something novel, that understanding will be very useful. People pooh-pooh Google's hiring interviews, but when was the last time Gmail's search results on your email were as bad as Bing's (I use this example because it's not their general index, I'm asking about your mail.) There are a lot of good reasons to bone up on CS 101 (and 201, 301, 401, and 501).... I disagree that it's just "studying for the test".
- dragandj 10y agoEven then, you'd have to know the characteristics of various data structures to be able to choose the right one. On top of that, in almost all code beyond CRUD, you'd have to write some custom algorithms - there, the knowledge from data structures and algorithms is really helpful.
- marcosdumay 10y agoYou know, besides the other comment about not implementing data structures in a real job¹, why do people insist on memorizing all that trivia about balancing binary trees instead of just using some much simpler self balancing structure like a B-tree²? 1 - I have. But it is overwhelming more likely that you'll just need to know their characteristics than how to implement them. 2 - And get better caching behavior for free.
- bravo3 10y agoI have a different perspective. This is for applied math in general, but translates to algorithms with a little stretch of imagination. In your daily life, you use tools to do your job. Over time, your tool set has sufficient coverage that it can handle most jobs. However, because of this "good enough" coverage, you may not realize the existence of other tools that may be far superior. I believe "applied math" is one such tool. (Translate to "algorithms".) Its applications are everywhere, including at least 50% of your daily life in my experience. However, you fail to see them because you may not have that tool in your tool belt! This is no different than wearing x-ray glasses - you get to see almost every problem in a different light. Google and others who realize it want to make use of these versatile glasses. I do not mean to be obtuse but a different perspective may be helpful!