this post was submitted on 06 Feb 2025
21 points (100.0% liked)

CSCareerQuestions

1047 readers
43 users here now

A community to ask questions about the tech industry!

Rules/Guidelines

Related Communities

Credits

Icon base by Skoll under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

applied internally to a role thatd be a nice pay pump. its a data role with a strong emphasis on python and sql skills. i studied my ass off on data concepts anticipating questions like "how would you start solving xyz problem" or "how would you find business insights on zyx" and the first question is "whats the difference between a dict and a list in python?" or hell, even a leetcode-like question. i like to think im decent at USING python and sql, but not having used them in a current role in ~2 years, these google-search-esque questions threw me off guard. i fumbled making up answers for a few but some i straight up had to say i have no fkn clue. so todays been a bit of a demeaning experience! has anyone else ever had an interview where they asked questions like that?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 8 points 5 hours ago (1 children)

Interviewing is a skill in itself, and one that you can practice. I would encourage you to apply for all sorts of positions you don't actually want just for the experience.

Sometimes, these questions aren't meant to get an accurate answer. They're meant to see how you approach an issue, especially under pressure. I've seen people print out multiple pages of indecipherable code and ask a candidate "what does this code do?". Of course, if you can answer it correctly you're hired, but no one realistically can. But they can watch how you break down code you've never seen, in an unfamiliar environment, to piece it together.

Sometimes the questions are meant to call a bluff, or reveal a know-it-all. In a good interview, you'll flat out say "I have no idea" a couple of times. But you'll follow it up with details on how you would handle it. For instance, I've never heard of a dict in Python until now, so I googled it. It seems they're the same as key-value pairs that are common in other languages.

They will never find a perfect candidate. The question in their minds is whether you're close enough and can be trained.

[โ€“] [email protected] 4 points 4 hours ago* (last edited 4 hours ago)

The way Python is implemented, almost all objects in the language are dicts and can be accessed with the __dict__ dunder. Which has some useful applications when transforming data.

But in the case, the interviewer was likely looking for knowledge that one is structured and maintained by indicies vs defined keys. And that searching through a dictionary is O[1] vs list that is O[N] but are inverted for deletion. So if you are doing a lot of inserts and seaeching, use a dict, but if you have something that has tons of deletions, use a list. However, there's tricks to improve the deletion speed downside that can be used with a slight memory tradeoff.