←back to thread

1764 points fatihky | 2 comments | | HN request time: 0s | source
Show context
buttershakes ◴[] No.12701447[source]
I had almost exactly this same engineering test when google interviewed me in 2006. It was terrible, and left a bad taste in my mouth. Given the complexity of the work I was doing at the time, the entire thing seemed ridiculous.
replies(2): >>12701579 #>>12701983 #
TheCapn ◴[] No.12701579[source]
The inode question gave me flashbacks to my interview with Amazon. They wanted me to explain what a hash function is. I kept giving answers for about 3 minutes explaining hashing, common algorithms, reasons to use it and places it applies.

Recruiter: "I was looking for you to say it's a fingerprint"

So I guess I was wrong, because despite explaining them in decent detail, I didn't use the one keyword.

replies(6): >>12701662 #>>12701711 #>>12701878 #>>12701993 #>>12702618 #>>12702696 #
dmayle ◴[] No.12701993[source]
I'd have failed too, because I use a very particular way to describe a hashing function.

A hashing function is actually a sorting function. It's supposed to take an input space and sort it in an unpredictable and evenly distributed way across the output space. What's more, neighboring points in the input space, no matter the sort used to determine proximity should not result in neighboring points in the output space.

Fingerprinting is just an emergent value that comes from choosing fixed length hashes, and the fact that the mapping from input to output is stable.

replies(1): >>12703288 #
1. rockdoe ◴[] No.12703288[source]
Why do you use the word "sort" rather than "map" here though.
replies(1): >>12706758 #
2. rocqua ◴[] No.12706758[source]
I'd guess because sort implies an ordering, which, when total, implies a distance.