Algorithms Interviews: Theory vs. Practice

52 points by program247365 3 years ago | 8 comments
  • 908B64B197 3 years ago
    What's even more interesting is the new meta-game around interviews.

    Algorithmic questions started with Microsoft, who wanted to make sure engineering hires could... program!

    The point was to make it as language agnostic as possible and friendly to college hires (since everyone who did a serious CS program did algorithms, there was a common vocabulary). You weren't even meant to study intensively for these, just brush up on your algo class.

    But now I keep seeing guides on the internet about "hacking the coding interview" and special "prep material" pushed by influencers (???) on YouTube that claim to be ex FAANG (hard to check). Apparently there's even classes taught at tier two colleges (Waterlo if I recall) that specifically focus on algorithm interviews. Not algorithms, just algorithms interviews. They get interview questions from students and the class is just memorizing as many of them as possible.

    • fullsend 3 years ago
      Yeah it is a skill set in and of itself. To pass a modern interview in my experience you need to take a week or two on Leetcode to brush up and do a run through Cracking the Coding Interview for concepts/terminology. In my opinion this is fueled by an abundance of excellent sheep (a good book) among hires at tech companies. If you’re trained for years and years (middle, high school, and college in the US) to study for SAT style tests (cracking the coding interview is full of test taking tactics) then when you’re asked to design interviews this is stuff you gravitate to because it’s easy to reproduce and understand. An excellent sheep appears to be a high achiever but only knows how to be given hurdles and jump them, not how to identify creativity or get nuance out of an interview process that is already woefully shallow. So it’s all people who spent lots of time studying for algos and data structures class asking each other those same questions. Asking “Are you one of us?”
      • strikelaserclaw 3 years ago
        some leetcode is good, too much is pretty much useless. There are people who study all solutions to hundreds of leetcode problems to crack the interview, while this hard work is admirable, i feel like they wasted so much time studying that than something that actually makes them a better engineer. For example, i studied Floyd's hare and tortoise algorithm for cycle detection in a linked list a couple months ago, its a beautiful algorithm but i doubt it made me even a little better as a software engineer, that is just one instance of my leetcode adventure, which after a certain point i felt like "man i learned a solution to this random problem which does not extend in a general way to increasing my knowledge and i will most likely forget the solution in a couple months anyway"
        • tubby12345 3 years ago
          Just because you do not do the kind of work that necessitates being familiar with that solution doesn't say anything about the universe of programming jobs. Realize two things

          1) many Leetcode style solutions are to problems that were at one time practical engineering problems; cycle detection infact is still relevant in cryptography.

          2) novel implementations are required all the time in companies that have bandwidth for greenfield projects (ie FAANG). For example, if you search through the source of pytorch (or tensorflow) you will find implementations of the solution to https://leetcode.com/problems/merge-intervals/description/

          So everyone always lamenting how useless Leetcode is, is pretty much telling on themselves re the kind of work they do.

          Edit: though this isn't what you broach, people that think there's no meaningful difference between eg O(n^2) and O(nlogn) are also broadcasting to the world that they've never run code "at scale". These companies have power bills that are denominated in Bs not Ms and so improving perf by even 1% (on a critical hot path) can be worth millions to the company (and RSU refreshers to you). If you don't believe me then believe Andrei alexandrscu

          https://youtu.be/ea5DiCg8HOY?t=175

          >So if you shave 1% you've made your salary for 10 years alone

          • alfiedotwtf 3 years ago
            I'm blanking on the actual quote, but something along the lines in chess is the same...

            "Someone with a 2300 ELO is a good player. Someone with a 2750 ELO has wasted their life"

          • 908B64B197 3 years ago
            > So it’s all people who spent lots of time studying for algos and data structures class asking each other those same questions. Asking “Are you one of us?”

            In my experience, there's a point where it becomes 100% cargo-culting/rote.

            The best approach is to keep the coding (it's essential to be able to write code on the whiteboard, period) and have some elements of algorithmic reasoning but focus on using those to solve a real problem.