News for hackers. Stuff that matters.
Re:Big-O Algorithm Complexity Cheat Sheet by derleth on Saturday May 04, 2013 @01:49PM (#5655646)
> what is a time complexity for finding a next item (according to a key) to a given one in a hash table?

Problem ill-stated as posed: Does not specify if the 'next' key is hashed, or even what 'next' means in this context.

Re:Big-O Algorithm Complexity Cheat Sheet by mixedbit on Saturday May 04, 2013 @02:05PM (#5655704)
Say, the smallest item in a hash table for which item.key is larger than given_item.key. Assume larger-than relation for keys is defined, so for example keys are integeters.
Re:Big-O Algorithm Complexity Cheat Sheet by sillysaurus on Saturday May 04, 2013 @02:11PM (#5655731)
Say, the smallest item in a hash table for which item.key is larger than given_item.key.

Well, keys in a hash table are hashed. This implies that unless you're searching for a specific key (e.g. "42") rather than a condition (e.g. "smallest key greater than 42") then the time complexity is necessarily O(N).

Re:Big-O Algorithm Complexity Cheat Sheet by mixedbit on Saturday May 04, 2013 @02:34PM (#5655833)
Correct :)