News for hackers. Stuff that matters.
Re:A Google Interviewing Story by user24 on Friday November 19, 2010 @08:20PM (#1923508)
the boolean array indexed by char effectively is a hashtable isn't it? where the hashing algorithm is index = ord(theChar).
Re:A Google Interviewing Story by alextp on Saturday November 20, 2010 @01:06PM (#1924920)
This is not quite true. It's a mapping, but it's not a hash table because the mapping is bijective (while hash tables just project the keys into the table space). So there is no possibility of collision, the number of keys is fixed, etc. It's just a table, like any other, and most of what is implied when talking about hash tables does not necessarily apply here.
Re:A Google Interviewing Story by user24 on Saturday November 20, 2010 @10:59AM (#1924669)
that was a genuine question. I think I'm right, but I might not be. Judging by the upvotes it looks like I am, but I'd like someone to come forward and say "Yes, that's correct" explicitly.
Re:A Google Interviewing Story by mrud on Saturday November 20, 2010 @11:35AM (#1924732)
Yes, that's correct.
Re:A Google Interviewing Story by user24 on Saturday November 20, 2010 @11:43AM (#1924755)
thanks :)