From 07fcc0401ffb88bea51eab4e7a997282545a27d7 Mon Sep 17 00:00:00 2001 From: Prab Date: Sun, 24 Mar 2019 09:45:56 +1100 Subject: [PATCH] Updated Open Addressing section (#30978) * Updated Open Addressing section Added a further disadvantage of Open Addressing * fix: reworded sentence --- .../computer-science/data-structures/hash-tables/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/computer-science/data-structures/hash-tables/index.md b/guide/english/computer-science/data-structures/hash-tables/index.md index ed53277fc5..a0a2fc31e4 100644 --- a/guide/english/computer-science/data-structures/hash-tables/index.md +++ b/guide/english/computer-science/data-structures/hash-tables/index.md @@ -116,7 +116,7 @@ Another way you can resolve hash collisions is using open addressing. In this me ![an example of open addressing in a hash table](https://github.com/TomerPacific/fccGuideImages/blob/master/380px-Hash_table_5_0_1_1_1_1_0_SP.svg.png?raw=true) -The major setback of open addressing lies in the fact that when needing to look for values, they might not be in the place you expect them to be (the key mapping). Therefore you have to traverse parts of the hash table in order to find the value you are looking for, thus resulting in increased time complexity. +The major setback of open addressing lies in the fact that when needing to look for values, they might not be in the place you expect them to be (the key mapping). Therefore you have to traverse parts of the hash table in order to find the value you are looking for, thus resulting in increased time complexity. Open addressing also results in most of the entries being clustered together in a specific locality, thereby resulting in inefficient memory usage. #### Time Complexity It is very important to note that hash tables have amortised constant complexity i.e. on an average case the complexity will be O(1).