About 77 results
Open links in new tab
  1. Why is it best to use a prime number as a mod in a hashing function?

    But since the probe increment is itself a hash value, it is uniformly distributed over the size of the hash table which eliminates the clustering you get with other collision resolution algorithms. TL;DR: a hash …

  2. For what kind of data are hash table operations O (1)?

    Hash table techniques that pick-a-new-function-and-rehash in order to guarantee O (1) lookups, even in the worst case, include: cuckoo hashing guarantees that each key lookup succeeds with at most 2 …

  3. Why use binary search trees when hash tables exist?

    Mar 17, 2018 · 5 Hash tables perform lookup, insertion, and deletion in O (1) time (expected and amortized) while the different variants of binary search tree (BST) - treap, splay, AVL, red-black - …

  4. data structures - How to resize a large, distributed hash table ...

    Nov 16, 2015 · 5 Many hash table implementations found in programming languages (such as Java's HashMap or Python's dict) dynamically increase the size of the hash table once the number of items …

  5. Why do hash tables have no access/indexing complexity but have $O …

    Hash table does not support index/access since the idea behind them is to "systematically scatter" elements in the structure to prevent/reduce collision, and with that, we do not expect to use such …

  6. algorithms - Two-Level (Perfect) Hash Tables in Practice - Computer ...

    Oct 6, 2024 · So one-level hash table is better than two-level hash table in the following points: has better guarantee about time of insert and delete operations (without lookup); has better constant for …

  7. (When) is hash table lookup O (1)? - Computer Science Stack Exchange

    It is often said that hash table lookup operates in constant time: you compute the hash value, which gives you an index for an array lookup. Yet this ignores collisions; in the worst case, every item

  8. Hash table versus binary search lookup for unchanging data

    Dec 6, 2015 · It only has 128 bytes of overhead for the hash table information though (16* 64 bit pointers) Going with an 8 bit hash table and 256 hash buckets, that is $20000/16=~78$, so worst …

  9. Why is Big O not defined here for a hash table?

    In this cheat sheet, average time complexity for access to a hash table is listed as N/A. I'm curious as to why. Since a hash table is mostly mathematical, I would assume it would be O(1) like the

  10. Time complexity of Hash table lookup - Computer Science Stack …

    Apr 21, 2020 · Suppose I have a hash table which stores the some strings. Let the index/key of this hash table be the length of the string. what is the time complexity of checking if the string of length K …