Skip to content

Commit e3f29c7

Browse files
authored
Merge pull request #5 from lhmzhou/master
2 parents d2d9044 + a5ec6d8 commit e3f29c7

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

graphs/graph_traversals.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def breadth_first_search(graph, start):
7373

7474
**Example interview question using BFS:**
7575

76+
* [Clone an undirected graph](https://www.geeksforgeeks.org/clone-an-undirected-graph/)
77+
7678

7779
**Runtime**: O(V + E)
7880

graphs/top_sort.md renamed to graphs/topological_sort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Introduction
1+
## Introduction to Topological Sorting
22
Aside from DFS and BFS, the most common graph concept that interviews will test is topological sorting. Topological sorting produces a linear ordering of nodes in a directed graph such that the direction of edges is respected.
33

44
A **topological sort** is an ordering of nodes for a directed acyclic graph (DAG) such that for every directed edge _uv_ from vertex _u_ to vertex _v_, _u_ comes before _v_ in the ordering.

hash_tables/hash_tables.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ address_book.get("Bob")
1111
'111-222-3333'
1212
```
1313

14-
Hash tables are very efficient â“ their insertion, deletion, and get operations take, on average, constant time.
14+
Hash tables are very efficient. Operations such as insertion, deletion, and get take, on average, constant time.
15+
1516
## How it works:
1617
### Hash Codes
1718
Internally,a hash table stores its values in an array. A special **hash function** is utilized to convert each key into a code, which is then converted into an index into the underlying array. This hash function has a hard requirement to return the same hash code for equal keys.

strings_arrays/binary_search.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### Introduction
2+
13
Binary search is a technique for efficiently locating an element in a sorted list. Searching for an element can done naively in **O(n)** time by checking every element in the list, but binary search's optimization speeds it up to **O(log n)**. Binary search is a great tool to keep in mind for array problems.
24

35
Algorithm

0 commit comments

Comments
 (0)