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

2

u/[deleted] Feb 16 '21

I only had 1 explicit loop in my implementation because I used “in” within Python, is that checking each 1 at a time or as a set? I thought it was the latter

1

u/spyke252 Feb 16 '21

It's actually doing the former, at least from my knowledge.

https://stackoverflow.com/questions/13884177/complexity-of-in-operator-in-python

2

u/[deleted] Feb 16 '21

Oh wow I never knew this, seems like this is where using the dict() would make it what I originally thought it was

Except I don’t know how to convert the Jewels characters into a dict without filling the dict itself ending up taking O(m) time. I just tried it again and in the Runtime I get the same Runtime I had before.

3

u/spyke252 Feb 16 '21

Even if you converted to a dict, it would only be O(m + n + n) time, which would be a huge improvement :)

1

u/FancyASlurpie Feb 16 '21 edited Feb 16 '21

I'd think you could just do set(jewels) as the set is implemented as a hashtable. And if you wanted a count of the individual jewels then doing {c:0 for c in jewels} to create the jewels counter should work. As spyke252 said below its a big improvement still even though you need to iterate the jewels once to populate the dict/set.

0

u/[deleted] Feb 16 '21

[deleted]

3

u/spyke252 Feb 16 '21

Hey man, I was just helping someone learn something new. This kind of response is unwarranted.