Skip to content

Commit

Permalink
fix(hashmap): improve methods documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amejiarosario committed May 23, 2020
1 parent 8ea61ce commit f6b47b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/data-structures/maps/hash-maps/hash-map.js
Expand Up @@ -30,6 +30,15 @@ class HashMap {
this.reset();
}

/**
* Reset or reinitialize all values on the hashmap. Used for rehashing.
*
* @param {array} buckets - New bucket.
* @param {number} size - The new size of the hashmap.
* @param {number} collisions - The number of collisions.
* @param {array} keysTrackerArray - The array of keys in insertion order
* @param {number} keysTrackerIndex - The last index of keysTrackerArray
*/
reset(
buckets = new Array(this.initialCapacity),
size = 0,
Expand Down

0 comments on commit f6b47b5

Please sign in to comment.