← Back to context

Comment by whimsicalism

3 years ago

I'm not sure what you even mean by an "in-depth definition." What I said is basically constitutive of a hashmap, it's place in the history of CS or whatever is not.

a not in-depth definition would be a 1 sentence definition of a hash map with probably give me an example of when you might want to use it.

an in-depth definition would be that, followed by how you implement a hash map (thus if your language of choice already has a hash map, don't use that but show us how you would implement this classic data structure), how do you avoid collisions, maybe discuss some various ways that you could implement it and what the tradeoffs are. This would be you 'understand!!' what a hashmap is, like deeply. (I hope my tone makes clear I do not advocate for this)

on edit: I think it seems you might actually be advocating for this deep definition? If so, probably you are working at relatively low level?

on edit 2: for example if you were using Python you might say a hash map is a dict, and talk about how to use dict, the in-depth definition would not allow this. Which I think is what the other posters were worried about, being asked not to use your language's implementation of the concept but go lower and show you can make the whole thing.

  • I don't think understanding how a hash map, an incredibly simple data structure used frequently, is all that "low level." If I really wanted low level, I would talk about having linked lists of arrays rather than a linked list of nodes so that you could benefit from fewer random lookups.

    I work as an ML engineer, so very high level.

    • Ok, perhaps for your job it is reasonable to know what I call the in-depth definition - implement hash map functionality in language interview is using without using built in hash map functionality of language, discuss trade-offs (or perhaps it is your particular interests that allows you to keep this information readily available) but I guess you can see how many people's jobs do not require this and it would be reasonable for job interviews in those fields to only want the shallow understanding - one line definition of hash map, when would you use it.

      If you ask for the in-depth understanding for positions that would never need it, it follows that you will be disadvantaging many applicants who might be great for the position and advantaging applicants who know at least one non-relevant thing.