Skip to content
Merged

Fixes #234

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
32 changes: 27 additions & 5 deletions day35/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
![cover](./cover.png)

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

From quite a lot of days we are looking at searching and sorting algorithms, try out the radix sort today.
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.

## Pseudocode

```
/* low --> Starting index, high --> Ending index */
quickSort(arr[], low, high)
{
if (low < high)
{
/* pi is partitioning index, arr[pi] is now
at right place */
pi = partition(arr, low, high);

quickSort(arr, low, pi - 1); // Before pi
quickSort(arr, pi + 1, high); // After pi
}
}
```

Referance: https://www.geeksforgeeks.org/quick-sort/

## Question

Given an unsorted list of elements, write a program to sort the given list using radix sort.
**Type:** Divide and Conquer

Given an unsorted list of elements, write a program to sort the given list using quick sort.

**Example**

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

## Solution

### [JavaScript Implementation](./JavaScript/radixsort.js)
### [JavaScript Implementation](./JavaScript/quickSort.js)

```js
to be added
```
```
File renamed without changes.
30 changes: 4 additions & 26 deletions day36/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
![cover](./cover.png)

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

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.

## Pseudocode

```
/* low --> Starting index, high --> Ending index */
quickSort(arr[], low, high)
{
if (low < high)
{
/* pi is partitioning index, arr[pi] is now
at right place */
pi = partition(arr, low, high);

quickSort(arr, low, pi - 1); // Before pi
quickSort(arr, pi + 1, high); // After pi
}
}
```

Referance: https://www.geeksforgeeks.org/quick-sort/
From quite a lot of days we are looking at searching and sorting algorithms, try out the radix sort today.

## Question

**Type:** Divide and Conquer

Given an unsorted list of elements, write a program to sort the given list using quick sort.
Given an unsorted list of elements, write a program to sort the given list using radix sort.

**Example**

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

## Solution

### [JavaScript Implementation](./JavaScript/mergeSort.js)
### [JavaScript Implementation](./JavaScript/radixsort.js)

```js
to be added
Expand Down