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?

  • odelik@lemmy.today
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    9 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.