0
C-sucks
2y

hey devos, I got a question to ask ya'll. I have an interview tomorrow with an MNC.

I was hovering through some leetcode problems when I came across a hard question that is forcing me to use a hashmap with the key of the user-defined type. I made up my mind to make use of C++ for the coding interview. Now, the problem is C++ asks me to implement a hash function.

If in case, I'm asked a similar question like this in the interview, which of these two options will you suggest:
a) implement your own hash function
b) use pointers as key

Comments
  • 0
    @zlice I said "C++ asks me to implement a hash function to hash my own defined type" and not, "C++ asks me to implement my own hash map"
  • 1
    @C-sucks I mean you could use pointers :/
Add Comment