Skip to content

Commit

Permalink
Fixes (#234)
Browse files Browse the repository at this point in the history
* Add @imkaka as a contributor

* day4

* corrections
  • Loading branch information
imkaka authored and MadhavBahl committed Feb 7, 2019
1 parent 6b4af4d commit 115c8d6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
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

0 comments on commit 115c8d6

Please sign in to comment.