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

0

u/[deleted] Feb 16 '21

[deleted]

25

u/[deleted] Feb 16 '21

The person who made this comment represents the exact kind of toxic/elitist snob you’ll find over at r/cscareerquestions. They act like this to scare people away from the field so there’s less competition.

0

u/[deleted] Feb 16 '21

[deleted]

5

u/Citizen_of_Danksburg Feb 16 '21

We generally look for people who can ask and answer interesting questions of data, but give them both high-quality data sources and tons of computational resources, so the cleaning and efficiency aspects are very much secondary considerations at the current stage of maturity.

I graduate in May with my master's in stats and am currently applying for jobs and I got to say, companies that don't do this really are doing themselves a disservice. I have an interview later today for a job in finance but it's a real estate private equity place. All the people seem really nice and like a great group to work with, but I would be their lone stats/data guy and that really doesn't sit well with me. Not only do I have to be their data engineer, I also have to be their data analyst, and data scientist. My undergrad is in math and stats. I know R, SAS, Matlab, and I've been picking up on some Python, and I did a little LinkedIn learning course for SQL since I've never seen it in school, but working 55-70 hours a week for $65k and being in charge of setting up their data infrastructure and computing infrastructure, and then probably be in charge of future hires, it just sounds like too much and makes me nervous.

I definitely wouldn't have access to high-quality data sources, there would be 0 computational resources, so I'd be spending even more than normal amounts of time cleaning data just to do some simple analysis.

I just wanted to say thanks for doing what you guys do. I'm sure it's wonderful to work there!

3

u/proverbialbunny Feb 16 '21

He's not saying he's working at a FAANG making X money, which is elitist. He's making a argument from his first hand experience, and it's a valid argument. I don't think it represents the larger industry, but there is nothing elitist about it, or at least by definition of the word.

1

u/[deleted] Feb 16 '21

I don’t mean elitist about the prestige of their company/salary, I mean elitist about how esoteric their work is.

1

u/proverbialbunny Feb 17 '21

That makes sense. I recognize esoteric topics can create elitism, though I would hesitate to call esoterism elitism. It's up to the individual if they make it elite or not.

Like me for example. I do a rare kind of data science work. There isn't any classes or books on the topic. I'm pretty much paving the industry. Is it elite? Definitely not. It's not some fancy thing people aspire to, not some hidden club, and it doesn't pay more than normal data science work too. If anything, it's just harder work most people would rather avoid.

-7

u/[deleted] Feb 16 '21

That's very common. It comes from lack of ability in the team (or management if they're the micromanaging type). If you don't know something exists, you're not going to consider it or use it.

Fields like NLP, network analysis, signal processing, computer vision etc. are very sensitive to selecting the right data structures & algorithms for the task. Hell, even with relational databases if properly normalized you'll always end up with data that does not fit in the "rows and columns" pattern.

There are so many thing you can do to data other than take an arithmetic mean or a sum so that you end up with rows and columns and use pandas from there.

Most data science teams at most companies are not very competent at data science.

4

u/recovering_physicist Feb 16 '21

I'm a physicist by trade, entry level DS by profession. I consider my strengths to be identifying and framing problems, but as you might expect I have a patchwork of scripting, data manipulation, and modeling skills learned ad hoc over my research and non-academic career.

Can you recommend any materials, books or (free or reasonably affordable) online courses that cover DS&A or SWE in general that you think would be suited to someone with my background?

My problem isn't that I've hit some wall where I don't understand things I come across, rather that I just don't know exactly what I need to go and learn on those fronts. I suspect that I'm familiar with some of the concepts by some other (or no) name, but I don't have it all tied together.

2

u/Why_So_Sirius-Black Feb 16 '21

Unsolicited but I’m senior as a stats major with a math minor. I don’t about you but I’m thinking about biting the bullet and just doing ga techs online masters in computer science dunces it’s only 7K and would give me structural and external accountability

1

u/Weird-Preparation Feb 16 '21

I'm in a similar position where I am working on pivoting to DS. My background is Chemical Engineering, but I've taught statistics and Matlab (and associated linear algebra). I've also spend 15 years as a sys admin. So I have a similar patchwork set of skills that need to be tied together.

1

u/recovering_physicist Feb 16 '21

Shoot me a DM if you want to chat about it. I broke in a year ago.

7

u/internet_poster Feb 16 '21

Most data science teams at most companies are not very competent at data science.

Yes, it’s certainly possible that the data science model that virtually every top tech company has converged on (involving people who separately specialize in analysis, in modeling, and in data infrastructure) is a shitty one. But I guess I’ll never know, because I don’t spend my interview time asking people to solve leetcode easy questions.

2

u/Admiral_Wen Feb 16 '21

Fields like NLP, network analysis, signal processing, computer vision etc. are very sensitive to selecting the right data structures & algorithms for the task.

I'm not an expert in NLP or computer vision, but how would leetcode type problems be useful here? I understand that deep learning models are sensitive to, say, the activation function or the optimizer selected. But understanding ADAM vs. RMSprop isn't the same as understanding binary heaps or pathfinding algorithms like Dijkstra's. Where would you have to use, say, DFS in computer vision? Genuine question.

-3

u/[deleted] Feb 16 '21

Why is everyone focused on DFS? Because it sounds scary? Almost all leetcode problems do not involve it so it's a stupid strawman argument.

DFS is used in path finding for example. This guy used it to find good solutions for his robotic pool.

2

u/Admiral_Wen Feb 16 '21

Because that's what's specifically asked about in the OP. Because it's precisely these types of specialized knowledge, such as DFS or dynamic programming, that he has a problem with. Not basics like strings, loops, or hash tables.

And the robotic pool solution you linked is a perfect example of the OP's issue. I know it's used for path finding. What he did was cool. But how is it a data science problem? If anything it's an engineering or computer science problem. If that's what your company needs, by all means hire a software engineer. It still doesn't make sense to ask data scientists questions about pathfinding, when data scientists work more with data visualization, ML, and statistical inferences.

1

u/[deleted] Feb 16 '21 edited Feb 16 '21

The thing about data science is that it's not just modeling.

There is data collection, pre-processing, modeling, validation and the forgotten post-processing phase.

For example that guy talked about creating a chess engine style of thing for it. So his data pipeline might look like:

Camera sensor -> object detection -> physics simulation -> pathfinding -> final result.

This is a classical "data product". I for example have done a similar pipeline:

Camera sensor -> object detection -> QR code reader/barcode reader -> database lookup -> final result.

In the beginning those were all separate "modules". Later on the object detection and the QR code reader/barcode reader became one neural network which increased performance. There is no reason why the guy that made the video couldn't do an end-to-end neural network that gave him the solution and that's probably the proper way to do it in the end.

That is data science. It's pretty advanced stuff and more complicated that import csv but this type of stuff is what you're actually paid for and what employers want. If your data pipeline is just data in the model and result out of the model, it's fairly limited and most problems will go unsolved since they need a more complicated approach with lots of post-processing. Or even chained models one after another.

For example I am currently working on a pipeline that would combine multiple data sources (image, NLP, time series) and give out actions to a control mechanism. Currently it's separate modules with rule based post-processing but it's heading towards a direction where it's all going to be a single neural network with separately pre-trained parts combined that can control directly.

3

u/Admiral_Wen Feb 16 '21

So I absolutely agree that DS is about more than just importing a csv and running some pandas. There is a long pipeline, and some of it involves engineering. However, I think realistically this pipeline would be broken up among several team members, including software and data engineers. While it's possible that one person can do all of it, I think it's an unrealistic expectation. So if someone is asking DFS-like questions on their interview, I'd still say that either the interview process is outdated or they're looking for an engineer.

You make good points.

0

u/[deleted] Feb 16 '21

I don't think anyone reasonable is actually asking DFS-like questions. It's a strawman argument. Most leetcode questions are not like that and I haven't personally ever encountered it or heard that anyone has encountered it.

When I interviewed at FAANG I got asked about sparse matrix multiplication. When I interview others, I ask stones & jewels style questions where if you know about big-O, know about hashing and know about other data structures than a python list (like queues and trees) you're good to go. Anyone that took a DS&A course will be able to get past my leetcode questions, anyone that took a calculus and linear algebra course will be able to get past my math questions and anyone that took intro to statistics will be able to pass my statistics questions.

Yes, there are companies that will rely on trivia like remembering a specific algorithm like DFS or remembering some specific equation from linear algebra or a specific concept from statistics or how a specific library/programming language works. Those questions are indeed stupid and is not limited to leetcode.