r/datascience • • Feb 15 '21

Job Search Please STOP asking Data Scientists about Leetcode questions meant for Software Engineers for job interviews

I've been working as a Data Scientist long enough to say that asking Leetcode questions for Data Scientists is completely disrespectful. This is both for both product and ML-based data scientists.

Something simple is fine, like hashmaps, two pointers, strings, some light algorithms etc. But graph theories, DFS with trees/dynamic programming has nothing to do with data analytics, ML fundamentals, statistical foundations, and data storytelling competence.

I really don't understand. When you have a wealth of ways to distinguish competent Data Scientists from juniors during interview pipeline (complicated SQL, pandas, data munging, visualization, ML training, building simulation code, etc.), why you'd rather choose questions like "how many moves do you need to get a Queen chess piece from this position to another on a chessboard" as a way of measuring how well a Data Scientist would perform analytics or ML training on the job. It really just feels like SWEs making fun of Data Scientists about how poor programmers we are.

Most companies don't pull crap like this, but for those who do, PLEASE STOP. Unless we received a BA or MA in computer science -- which majority if not most of us did not -- we won't be able to solve shit like this unless we cheat and look at answers directly on leetcode or geekforgeeks. And it's infuriating and embarrassing for us to sink to this kind of level to solve questions that aren't meant for us. I get that Data people need to know programming, but WE AREN'T SWEs, and DS is not SWE.

Edit: I'm getting a lot of replies saying that I suck at programming and I need to learn SWE fundamentals. I said over and over that I'm not against understanding foundations of SWE (hashmaps, runtime, pointers, optimized solutions vs brute force). These are important. But when you get into highly niched algorithm named after somebody where you need to do some complicated tricks or build a whole system that requires multiple functions, DFS-based dynamic programming, multiple inheritance methods all in 45 minutes that would unnerve even seasoned SWEs out of practice, that's when it becomes totally unreasonable, outside the realm of data science, and just disrespectful to what Data Scientists do on a daily basis. But that's the line I draw, and the overall question is: at what point do interview questions become unjustifiable and unrelated to the position at hand? I've spent years using pandas, scikit-learn, tableau, and complicated SQL for daily data tasks. Why is it that you can't test me on this stuff which occurs on day-to-day basis for majority of data scientists?

Edit Edit: Btw, shame on those of you just downvoting everything I'm saying without reading any of it (I can't even locate my own comments anymore). It's immature and completely ridiculous. I know it's the internet, but have some decency and respect for your interlocutors. You guys are all professionals right?

984 Upvotes

324 comments sorted by

View all comments

Show parent comments

4

u/Admiral_Wen Feb 16 '21

The idea behind leetcode questions is that you do not require any specialized knowledge.

Really? I admit that the jewels and stones problem you mentioned doesn't require specialized knowledge. But beyond easy problems it seems like a lot does. For example, Unique Paths II is a dynamic programming problem, and Unique Paths III is a Hamiltonian paths problem which uses DFS. These are the topics that the OP mentioned and was criticizing. Is this not specialized knowledge?

-1

u/[deleted] Feb 16 '21

Dynamic programming is found in everything. From web programming to embedded to basically every single ML algorithm. DFS is also found basically everywhere you have trees or graphs including web programming, embedded programming or ML algorithms that happen to use graphs (which is quite a lot of them).

It's not specialized, it's the opposite.

Even if you're not going to be implementing ML algorithms, it's good to know that those techniques exist. You encounter them all the time in data science.

In my experience most leetcode questions do not require you to be a tree expert. In fact, most of them stick to basic data structures and maybe a little bit of tree traversal or dynamic programming. For example the DFS problem you linked is a leetcode HARD problem. Even fucking Google won't ask leetcode hard questions.

5

u/Admiral_Wen Feb 16 '21

To say that it's found everywhere isn't a sound argument. We can just as easily say that calculus and matrix algebra is found everywhere. For example, gradient descent is just multivariate chain rule, implemented via matrix operations. Does this mean we should ask calculus problems during interviews? I don't think so. These topics (DFS, dynamic programming) are found "behind the scenes" like many other topics are. They are specialized, do you really expect someone to know DFS if they haven't specifically learned it (unlike the stones & jewels problem, which is more general)? If not, then it is specialized. If you really expect data scientists to know this, then you're expecting all data scientists to come from a computer science background, which not all of us do.

1

u/[deleted] Feb 16 '21

I think we should ask calculus problems during interviews. At least I do. I also think we should ask basic statistics problems during interviews. I do that too.

I expect every candidate to have the equivalent knowledge of someone that took a minor in math, stats and CS. You don't need to be an expert, but you need the very basic fundamentals. If you have no idea what a dot product is or what a derivative is, you have no business working in data science.

Most of the the time we hire physicists while most of the applicants come from social sciences, biology, chemistry and statistics. Why physicists? Because they usually took 2-3 CS courses and know how to solve simple leetcode problems (they obviously get hints and can ask questions during the interview).

I don't expect people to know DFS for data scientists. Most leetcode problems don't contain DFS, those would be usually leetcode hard questions and even FAANG doesn't ask those that often.

Dynamic programming is super important though. It can be summed up as "break down a big problem into smaller problems and solve those". It's basically a foundation of problem solving. Add caching the results of smaller problems so they can be reused and you've got yourself dynamic programming.

This is super simple stuff. Anyone that complains about this is simply incompetent. Don't make strawman arguments please, most of leetcode easy & medium questions are NOT graph/tree related questions or they are super simple where you don't need to know any specific algorithm, just know that a tree has children and that you can traverse it.