Timeline for FizzBuzz - really?
Current License: CC BY-SA 2.5
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 5, 2014 at 15:49 | comment | added | rlperez | Hashes can have collisions. That's why its usually stated as amortized constant time. | |
Feb 5, 2014 at 15:32 | comment | added | Trylks | Correct me if wrong, but I think hash tables have constant access times, assuming they are done properly and there are no collisions. Therefore, a search using a hash function should be possible in constant time. | |
Jul 7, 2011 at 0:31 | comment | added | configurator |
int? result; for (int i = 0; i < int.MaxValue; i++) { T item = (i < array.Length) ? array[i] : someDummyItem; if (item == whatWereLookingFor) result = i; } return result; - constant time :)
|
|
Nov 15, 2010 at 1:28 | comment | added | MIA | @Nemi - Yes I did. The person in question wasn't one with hiring authority, but I did get an offer on the position. | |
Nov 12, 2010 at 18:20 | comment | added | Nemi | Did you have a discussion with the interviewer explaining why their solution was not constant time? If I were the interviewer and you were able to succinctly and without malice convince me I was wrong I would hire you on the spot. | |
Oct 30, 2010 at 0:10 | history | answered | MIA | CC BY-SA 2.5 |