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

113

u/CrwdsrcEntrepreneur Feb 16 '21

To be fair, Leetcode style questions have little to do with most of what SWEs do as well but they still interview each other using that format.

It's a broken system for sure but it's also not that hard to learn enough just to pass technical interviews.

23

u/beginner_ Feb 16 '21

So true. Why do you need to know how to implement some obscure tree-search algorithm for a chess problem when all I will do is intranet web apps full of inane business rules?

The issues is that everyone is spineless nowadays. They all protect their own ass first and foremost. See if a candidate turns out bad you can show you did your due diligence with stupid brain teasers and quizzes. FAANG does it so it must be ok, right? Instead they should make way simpler tests and ask some more general "management type questions". I used to hate on them too but now I understand. Example: How many 1 liter bottles can fit into a jumbo jet? It's a stupid question but important is the thought process of the candidate. He needs to ask things (like when asking the users/stakeholders). Does he ask at all? And if what does he ask? The form of the bottles obviously matters. What also matters is the needed accuracy. Is an educated guess good enough? and so forth.

Actual real-world problem solving. Just calculating the volume of the jet using a function of the jets body shape and integral calculus might show your math/technical skills but if no questions are asked if this level of accuracy is even needed? On some level this also test for social skills.

9

u/[deleted] Feb 16 '21

Honestly I've been asked very good, thought provoking questions involving my own strengths that the interviewer learned from my resume. For instance, one was a question that required creative mixture of dictionary hashmaps, string parsing, and hidden markov model (thus a good combo of probability theory and CS fundamentals). Why HMM? It's because I did a side project on it and they saw my project. Solving this question brought new ways to further my own project and thinking about real world application of markov principles, and I was really excited by the new "aha" moments I had as I was talking with the interviewer.

Sadly these moments are very few and only asked by smaller companies. Majority of the time it's just boring SQL questions involving some rank functions or nested case statements.

11

u/CrwdsrcEntrepreneur Feb 16 '21

Even a boring SQL question is way more likely to be relevant to a DS' day-to-day tasks than "find the top view of a binary tree" or some other BS LC question where you'll never again use the algo needed to solve it.

48

u/[deleted] Feb 16 '21

Yea it's ridiculous people supporting leetcode here when even SWEs think it's total BS. Who are these supportive people??

8

u/mniejiki Feb 16 '21

Every SWE interview approach that provides decent signal has people hating it and pointing out how bad it is. In my experience leetcode has the least people hating it.

4

u/Urthor Feb 20 '21

Yeah this.

The amount of salt at 8-12 hour take home projects was/is FAR larger than 1h leetcode rounds.

1

u/call_me_arosa Feb 16 '21

Yep, every single day in a programming related sub there is a post about how bad the hiring process is. If there were simple and scalable options to filter candidates it would be already wide spread.
My company don't receive hundreds of candidates per position so we can afford to not use leetcode interviews but I can understand why it's used.

2

u/[deleted] Feb 16 '21

It seems more like a case of "hey these people did it so I will too".

It's more a lack of creativity and/or overcompensation for risk (of a bad hire) than some kind of a joke, as the OP described.

4

u/[deleted] Feb 16 '21

Sometimes it's about intelligence and problem solving. I wouldn't expect anyone to remember algorithms from scratch, but I should be able to pose a problem and work together with a candidate to come up with a solution.

I honestly don't care if someone knows SQL or some other language. I care if someone is smart, can problem solve, and learn quickly.

5

u/proverbialbunny Feb 16 '21

I care if someone is smart, can problem solve, and learn quickly.

And that's what makes a software engineer a software engineer, so leetcode makes sense. Though, I'd question if it helps identifying good future employees and help weed out bad ones. Maybe software engineering shouldn't be about about problem solving quickly. Has anyone looked at the data?

On the data science side solving difficult problems takes months, not hours, and pushing someone reduces that necessary creative aspect. To go fast one must go slow. Pushing for speed is going to get you young inexperienced data scientists or desperate data scientists. This is why whiteboard problems are frowned upon for data science interviews.

9

u/CrwdsrcEntrepreneur Feb 16 '21 edited Feb 16 '21

I wouldn't expect anyone to remember algorithms from scratch

You're missing a large chunk of LC type questions then. If you expect to "work together and come up with a solution" in a 30 min interview with a person who has never seen a BFS or DP problem, you don't understand what we're talking about in this thread.

1

u/[deleted] Feb 16 '21

If they know BFS or DP, then cool, we'll talk about that. If they don't, it's interesting to discuss how one might approach it from first principals.

1

u/CrwdsrcEntrepreneur Feb 16 '21

Sure, that's a better approach, but (anecdotally at least) it's not the approach taken by most interviewers who overly rely on the LC questions.

Also, is it the best approach? And I mean this from the employers POV. How easy is it to hire a false positive? I.e. the Leetcode "expert" that isn't very useful in real world projects? Again, as someone who's gone through these type of interviews, they're actually not that hard as long as you have enough time to prepare and practice.

1

u/[deleted] Feb 16 '21

To be honest I don't actually know what people mean by leetcode. I'm never going to be asking people to write hardware level hacks for performance, or how to approximate pi or another mathematical function in less than N cycles. That's always been my definition of leetcode, the kinda stuff you need for generating 4k executable graphics demos... not the basics of how you might implement some optimisation algorithm.

After being burnt by a couple of employees that basically bluffed being able to code at any reasonable speed, I do see the value of getting down to something algorithmic and implementation questions. But I'm once I'm satisfied they can actually code, I much prefer to focus on the high level questions that are tailored to the past experience of the candidate.

Fwiw, in my country employment isn't "at will", and while I generally think that's a good thing, it does mean a bad hire is more difficult to cut ties with.

0

u/[deleted] Feb 16 '21

[deleted]

15

u/feanor_curufin Feb 16 '21 edited Feb 16 '21

I think it's quite the opposite. A junior SE has the concepts from School nice and fresh and a senior SE depends on his experience and his actual job. At least, it's what I have seen.

I've been helping HR in technical eval for many years at different companies (both frontend & backend) and I have discovered that a simple white board with the question "Explain to me one project of your election, to the detail" is really enough with most seniors. You can dig, ask questions about concepts, if it is a real project why they've taken some decisions or their roles...

1

u/CrwdsrcEntrepreneur Feb 16 '21

Knowing and using are 2 different things.