Hacker News new | ask | show | jobs
by tubby12345 1710 days 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

2 comments

Yeah I don’t intend to put down leetcode or algorithms and data structures that are the foundation of the work we do. I agree there is a difference between the level of programmer who calls sort() and the level of programmer who has to implement sort() for their service. But I’ve found that these tests, although grounded in something useful like you say, have become a sort of easy out for a class of interviewers. You can tell this live - the good kind will accept mistaken syntax as long as your algorithm is right, you try to handle edge cases, etc. and the other kind I call excellent sheep will only accept one particular path because their very mentality is rote and by the book. It’s become its own entire interview metagame because of those people. Rather than for the application or the deeper knowledge it might indicate, this test is given because it’s all the interviewer knows! I like your point about the value of a 1% gain, etc.
i mean, i never said it wasn't required for a programmer to know about time,space complexity and some frequently used algorithmic patterns and data structures. My lamentation was against grinding leet code (not studying leetcode mind you) but grinding it and in general against interviews that seem to raise the bar higher and higher on the kind of leetcode questions they give. For that cycle detection algorithm example, if i ever encountered it in a real world scenario, i would just google "algorithms for cycle detection in a linked list", and just study some of them.