Skip to content

Commit 7739418

Browse files
committed
Add README.
1 parent 4d6d5da commit 7739418

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/data-structures/graph/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Graph
22

3+
In computer science, a graph is an abstract data type
4+
that is meant to implement the undirected graph and
5+
directed graph concepts from mathematics, specifically
6+
the field of graph theory
7+
38
A graph data structure consists of a finite (and possibly
49
mutable) set of vertices or nodes or points, together
510
with a set of unordered pairs of these vertices for an
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Hash Table
2+
3+
In computing, a hash table (hash map) is a data
4+
structure which implements an associative array
5+
abstract data type, a structure that can map keys
6+
to values. A hash table uses a hash function to
7+
compute an index into an array of buckets or slots,
8+
from which the desired value can be found
9+
10+
Ideally, the hash function will assign each key to a
11+
unique bucket, but most hash table designs employ an
12+
imperfect hash function, which might cause hash
13+
collisions where the hash function generates the same
14+
index for more than one key. Such collisions must be
15+
accommodated in some way.
16+
17+
![Hash Table](https://upload.wikimedia.org/wikipedia/commons/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg)
18+
19+
Hash collision resolved by separate chaining.
20+
21+
![Hash Collision](https://upload.wikimedia.org/wikipedia/commons/d/d0/Hash_table_5_0_1_1_1_1_1_LL.svg)
22+
23+
## References
24+
25+
[Wikipedia](https://en.wikipedia.org/wiki/Hash_table)

0 commit comments

Comments
 (0)