mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-07 18:10:24 +08:00
Add README.
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
# Graph
|
# Graph
|
||||||
|
|
||||||
|
In computer science, a graph is an abstract data type
|
||||||
|
that is meant to implement the undirected graph and
|
||||||
|
directed graph concepts from mathematics, specifically
|
||||||
|
the field of graph theory
|
||||||
|
|
||||||
A graph data structure consists of a finite (and possibly
|
A graph data structure consists of a finite (and possibly
|
||||||
mutable) set of vertices or nodes or points, together
|
mutable) set of vertices or nodes or points, together
|
||||||
with a set of unordered pairs of these vertices for an
|
with a set of unordered pairs of these vertices for an
|
||||||
|
25
src/data-structures/hash-table/README.md
Normal file
25
src/data-structures/hash-table/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Hash Table
|
||||||
|
|
||||||
|
In computing, a hash table (hash map) is a data
|
||||||
|
structure which implements an associative array
|
||||||
|
abstract data type, a structure that can map keys
|
||||||
|
to values. A hash table uses a hash function to
|
||||||
|
compute an index into an array of buckets or slots,
|
||||||
|
from which the desired value can be found
|
||||||
|
|
||||||
|
Ideally, the hash function will assign each key to a
|
||||||
|
unique bucket, but most hash table designs employ an
|
||||||
|
imperfect hash function, which might cause hash
|
||||||
|
collisions where the hash function generates the same
|
||||||
|
index for more than one key. Such collisions must be
|
||||||
|
accommodated in some way.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Hash collision resolved by separate chaining.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
[Wikipedia](https://en.wikipedia.org/wiki/Hash_table)
|
Reference in New Issue
Block a user