Skip to content

Commit 115c8d6

Browse files
imkakaMadhavBahl
authored andcommitted
Fixes (#234)
* Add @imkaka as a contributor * day4 * corrections
1 parent 6b4af4d commit 115c8d6

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed
File renamed without changes.
File renamed without changes.

day35/README.md

+27-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
11
![cover](./cover.png)
22

3-
# Day 36 - Search and Sort Algorithms Part I: Radix Sort
3+
# Day 35 - Search and Sort Algorithms Part H: Quick Sort
44

5-
From quite a lot of days we are looking at searching and sorting algorithms, try out the radix sort today.
5+
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot.
6+
7+
## Pseudocode
8+
9+
```
10+
/* low --> Starting index, high --> Ending index */
11+
quickSort(arr[], low, high)
12+
{
13+
if (low < high)
14+
{
15+
/* pi is partitioning index, arr[pi] is now
16+
at right place */
17+
pi = partition(arr, low, high);
18+
19+
quickSort(arr, low, pi - 1); // Before pi
20+
quickSort(arr, pi + 1, high); // After pi
21+
}
22+
}
23+
```
24+
25+
Referance: https://www.geeksforgeeks.org/quick-sort/
626

727
## Question
828

9-
Given an unsorted list of elements, write a program to sort the given list using radix sort.
29+
**Type:** Divide and Conquer
30+
31+
Given an unsorted list of elements, write a program to sort the given list using quick sort.
1032

1133
**Example**
1234

@@ -17,8 +39,8 @@ output: [1, 2, 3, 4, 5, 6, 7, 8, 9]
1739

1840
## Solution
1941

20-
### [JavaScript Implementation](./JavaScript/radixsort.js)
42+
### [JavaScript Implementation](./JavaScript/quickSort.js)
2143

2244
```js
2345
to be added
24-
```
46+
```
File renamed without changes.

day36/README.md

+4-26
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,12 @@
11
![cover](./cover.png)
22

3-
# Day 35 - Search and Sort Algorithms Part H: Quick Sort
3+
# Day 36 - Search and Sort Algorithms Part I: Radix Sort
44

5-
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot.
6-
7-
## Pseudocode
8-
9-
```
10-
/* low --> Starting index, high --> Ending index */
11-
quickSort(arr[], low, high)
12-
{
13-
if (low < high)
14-
{
15-
/* pi is partitioning index, arr[pi] is now
16-
at right place */
17-
pi = partition(arr, low, high);
18-
19-
quickSort(arr, low, pi - 1); // Before pi
20-
quickSort(arr, pi + 1, high); // After pi
21-
}
22-
}
23-
```
24-
25-
Referance: https://www.geeksforgeeks.org/quick-sort/
5+
From quite a lot of days we are looking at searching and sorting algorithms, try out the radix sort today.
266

277
## Question
288

29-
**Type:** Divide and Conquer
30-
31-
Given an unsorted list of elements, write a program to sort the given list using quick sort.
9+
Given an unsorted list of elements, write a program to sort the given list using radix sort.
3210

3311
**Example**
3412

@@ -39,7 +17,7 @@ output: [1, 2, 3, 4, 5, 6, 7, 8, 9]
3917

4018
## Solution
4119

42-
### [JavaScript Implementation](./JavaScript/mergeSort.js)
20+
### [JavaScript Implementation](./JavaScript/radixsort.js)
4321

4422
```js
4523
to be added

0 commit comments

Comments
 (0)