Skip to content

Commit d618127

Browse files
committed
vault backup: 2023-04-01 23:36:27
1 parent caf4f83 commit d618127

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Algorithms/Searching.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
The following steps are followed to search for an element `k = 1` in the list below.
77

8-
![./Algorithms/Attachments/Array to be searched for](linear-search-initial-array.webp)
8+
![Array to be searched for](Attachments/linear-search-initial-array.webp)
99
1. Start from the first element, compare `k` with each element `x`.
1010

11-
![./Algorithms/Attachments/Compare with each element](linear-search-comparisons.webp)
11+
![Compare with each element](Attachments/linear-search-comparisons.webp)
1212
2. If `x == k`, return the index.
1313

14-
![Algorithms/Attachments/Element found](linear-search-found.webp)
14+
![Element found](Attachments/linear-search-found.webp)
1515
3. Else, return `not found`.
1616

1717
```Python
@@ -36,11 +36,11 @@ def linearSearch(array, n, x):
3636

3737
## How Binary Search Works?
3838

39-
![Algorithms/Attachments/Initial array](binary-search-initial-array.webp)
40-
![Setting pointers](binary-search-set-pointers.webp)
41-
![Algorithms/Attachments/Finding mid element](binary-search-mid.webp)
42-
![Algorithms/Attachments/Mid element](binary-search-find-mid.webp)
43-
![Algorithms/Attachments/Found](binary-search-mid-again.webp)
39+
![Initial array](Attachments/binary-search-initial-array.webp)
40+
![Setting pointers](Attachments/binary-search-set-pointers.webp)
41+
![Finding mid element](Attachments/binary-search-mid.webp)
42+
![Mid element](Attachments/binary-search-find-mid.webp)
43+
![Found](Attachments/binary-search-mid-again.webp)
4444

4545
```Python
4646
# Binary Search in python

Algorithms/Sorting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def insertionSort(array):
6464

6565
# Merge Sort
6666

67-
![Algorithms/Attachments/Merge Sort example](merge-sort-example_0.png)
67+
![Merge Sort example](Attachments/merge-sort-example_0.png)
6868

6969
```Python
7070
# MergeSort in Python
@@ -186,7 +186,7 @@ def quickSort(array, low, high):
186186

187187
# Heap Sort
188188

189-
![Algorithms/Attachments/Max Heap and Min Heap](max-heap-min-heap.png)
189+
![Max Heap and Min Heap](Attachments/max-heap-min-heap.png)
190190

191191
```Python
192192
# Heap Sort in python

Algorithms/Two Pointers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ def hasCycle(head: Optional[Node]) -> bool:
2929

3030
To help illustrate this algorithm, I'll use some very relevant clipart. We'll start with the linked list. The `tortoise` begins at the `head`, while the `hare` begins at `head.next`.
3131

32-
![Algorithms/Attachments/Example 0](tortoise-and-hare-example_0.png)
32+
![Example 0](Attachments/tortoise-and-hare-example_0.png)
3333

3434
Since `hare` and `hare.next` are both not `null`, we'll enter the while loop. `tortoise` and `hare` are not equal to each other, so we will move them both over. `tortoise` gets moved over one spot, and `hare` gets moved over two spots.
3535

36-
![Algorithms/Attachments/Example 0](tortoise-and-hare-example_1.png)
36+
![Example 0](Attachments/tortoise-and-hare-example_1.png)
3737

3838
The while loop is still true. Again, `tortoise` and `hare` are not equal to each other. We'll move the `tortoise` over one, and the `hare` over two nodes.
3939

40-
![Algorithms/Attachments/Example 0](tortoise-and-hare-example_2.png)
40+
![Example 0](Attachments/tortoise-and-hare-example_2.png)
4141

4242
The while loop is still true, but this time, `tortoise` and `hare` are equal to each other. This means that a cycle was found, so we will return true.
4343

Data Structures/Hash Table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In chaining, if a hash function produces the same index for multiple elements, t
55

66
If `j` is the slot for multiple elements, it contains a pointer to the head of the list of elements. If no element is present, `j` contains `NIL`.
77

8-
![Data\ Strutures/Attachments/Collision Resolution using chaining](Hash-3_1.webp)
8+
![Collision Resolution using chaining](Attachments/Hash-3_1.webp)
99

1010

1111
## 2. Open Addressing

0 commit comments

Comments
 (0)