Skip to content

Commit 24ece20

Browse files
authored
Merge pull request #139 from raj-rathod/rajesh
Rajesh
2 parents 8876e60 + e44df28 commit 24ece20

File tree

8 files changed

+80
-13
lines changed

8 files changed

+80
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ graph TD;
6060
- **Sorting**
6161
- [Selection Sort](https://github.com/raj-rathod/DSA-visualisation-in-angular/tree/main/src/app/components/Algorithms/sorting/selection-sort/README.md)
6262
- [Insertion Sort](https://github.com/raj-rathod/DSA-visualisation-in-angular/tree/main/src/app/components/Algorithms/sorting/insertion-sort/README.md)
63-
- Merge Sort
63+
- [Merge Sort] (https://github.com/raj-rathod/DSA-visualisation-in-angular/tree/main/src/app/components/Algorithms/sorting/merge-sort/README.md)
6464
- Quick Sort
6565
- Counting Sort
6666
- Radix Sort
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
![GitHub Repo stars](https://img.shields.io/github/stars/raj-rathod/DSA-visualisation-in-angular?style=social)
2+
![GitHub forks](https://img.shields.io/github/forks/raj-rathod/DSA-visualisation-in-angular?style=social)
3+
![GitHub watchers](https://img.shields.io/github/watchers/raj-rathod/DSA-visualisation-in-angular?style=social)
4+
![GitHub contributors](https://img.shields.io/github/contributors/raj-rathod/DSA-visualisation-in-angular)
5+
![GitHub issues](https://img.shields.io/github/issues-raw/raj-rathod/DSA-visualisation-in-angular)
6+
7+
<p align='center' >
8+
<img src="https://raw.githubusercontent.com/raj-rathod/DSA-visualisation-in-angular/main/src/assets/icons/dsa-logo.png"/>
9+
</p>
10+
11+
# Data structure and algorithms visualization [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Visualization%20is%20the%20better%20way%20to%20understand%20of%20the%20things&url=https://raj-rathod.github.io/DSA-visualisation-in-angular/&via=Rajesh946055&hashtags=dsa,faang,datastructures,Algorithms,developers)
12+
> DSA Visualization is a project on **data structures and algorithms**. In this project all points of data structures and algorithms like as working approach, properties, operations, applications, advantages and disadvantages are well explained and visualize the operations for better understanding.
13+
14+
```HTML
15+
Visualization is the better way to understand of the things
16+
```
17+
18+
## [Dsa visualization live 👈](https://raj-rathod.github.io/DSA-visualisation-in-angular/)
19+
20+
_If you like this project, please leave me a star._ &#9733;
21+
22+
## Merge Sort | Merge Sort Properties | Merge Sort Applications | Merge Sort Visualization | Merge Sort Complexity | Merge Sort Space Complexity
23+
24+
### What is Merge Sort ?
25+
26+
>The Merge Sort algorithm is a sorting algorithm that is based on the Divide and Conquer paradigm. In this algorithm, the array is initially divided into two equal halves and then they are combined in a sorted manner
27+
Think of it as a recursive algorithm continuously splits the array in half until it cannot be further divided. This means that if the array becomes empty or has only one element left, the dividing will stop, i.e. it is the base case to stop the recursion. If the array has multiple elements, split the array into halves and recursively invoke the merge sort on each of the halves. Finally, when both halves are sorted, the merge operation is applied. Merge operation is the process of taking two smaller sorted arrays and combining them to eventually make a larger one
28+
29+
### Merge Sort Flowchart
30+
- mergeSort(arr[], left, right)
31+
- If right > left
32+
- Find the middle point to divide the array into two halves: middle m = left + (right – left)/2
33+
- Call mergeSort for first half: mergeSort(arr, lrft, m)
34+
- Call mergeSort for second half: mergeSort(arr, m + 1, right)
35+
- Merge the two halves sorted merge(arr, left, m, right)
36+
37+
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/merge-sort-flowchart.jpg?raw=true">
38+
39+
<br>
40+
41+
### Merge Sort Example
42+
43+
<br>
44+
45+
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/merge-sort.jpg?raw=true">
46+
47+
## [Learn More About Merge Sort 👈](https://raj-rathod.github.io/DSA-visualisation-in-angular/)
48+
49+
50+
## Contributing
51+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
52+
Please read the [Contribute guide](.github/CONTRIBUTING.md)
53+
54+
55+
## Connect with me ~Rajesh Rathore
56+
57+
[![Linkedin Badge](https://img.shields.io/badge/-LinkedIn-0e76a8?style=flat-square&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/rajesh-rathore-0501/)
58+
[![Website Badge](https://img.shields.io/badge/Website-3b5998?style=flat-square&logo=google-chrome&logoColor=white)](https://linktr.ee/rajesh_rathore)
59+
[![Twitter Badge](https://img.shields.io/badge/-Twitter-00acee?style=flat-square&logo=Twitter&logoColor=white)](https://twitter.com/Rajesh946055)
60+
[![Instagram Badge](https://img.shields.io/badge/-Instagram-e4405f?style=flat-square&logo=Instagram&logoColor=white)](https://www.instagram.com/raj_rathod1313/?hl=en)
61+
62+
63+
***Do star, fork and share the repo to show your support, it would help others too!*** <br>
64+
<br>
65+
Let me know your views or any changes or improvements or contribute to make better for others
66+
67+
:heart: ***Thank you all for Forking this repository and contribute*** :heart:

src/app/components/Algorithms/sorting/merge-sort/merge-sort.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h1 class="text-center"> Merge Sort </h1>
22
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.defination"></div>
3-
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.explainImage"></div>
4-
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.properties"></div>
5-
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.flowChart"></div>
63
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.workingProcedure"></div>
4+
<div class="mt-md-4 mt-3 col-md-7" [innerHtml]="mergeSortMetaData.flowChart"></div>
5+
<div class="mt-md-4 mt-3 col-md-7" [innerHtml]="mergeSortMetaData.explainImage"></div>
6+
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.properties"></div>
77
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.applications"></div>
88
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.other"></div>
99
<div class="mt-md-4 mt-3" [innerHtml]="mergeSortMetaData.advantage"></div>

src/app/core/algorithms/sorting-meta-data.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ const mergeSortData = {
175175
the merge operation is applied. Merge operation is the process of taking two smaller sorted arrays and
176176
combining them to eventually make a larger one
177177
`,
178-
flowChart:"assets/ds-image/DSA-404.webp",
179-
explainImage:"assets/ds-image/DSA-404.webp",
178+
flowChart:"assets/ds-image/merge-sort-flowchart.jpg",
179+
explainImage:"assets/ds-image/merge-sort.jpg",
180180
workingProcedure:[
181-
'mergeSort(arr[], l, r)',
182-
'If r > l',
183-
`Find the middle point to divide the array into two halves: middle m = l + (rl)/2`,
184-
`Call mergeSort for first half: mergeSort(arr, l, m)`,
185-
`Call mergeSort for second half: mergeSort(arr, m + 1, r)`,
186-
`Merge the two halves sorted in steps 2 and 3: merge(arr, l, m, r)`
181+
'mergeSort(arr[], left, right)',
182+
'If right > left',
183+
`Find the middle point to divide the array into two halves: middle m = left + (rightleft)/2`,
184+
`Call mergeSort for first half: mergeSort(arr, lrft, m)`,
185+
`Call mergeSort for second half: mergeSort(arr, m + 1, right)`,
186+
`Merge the two halves sorted merge(arr, left, m, right)`
187187
],
188188
properties:[
189189
`Merge Sort is useful for sorting linked lists.`,

src/app/core/meta-data/meta-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const socialLinkes: SocialLink[] = [
2828
{
2929
name:"Instagram",
3030
image:"assets/icons/instagram.svg",
31-
url: "https://www.instagram.com/raj_rathod1313/"
31+
url: "https://www.instagram.com/dsa_visualization/"
3232
},
3333
{
3434
name: "Linkedin",
1 MB
Loading
178 KB
Loading

src/assets/ds-image/merge-sort.jpg

180 KB
Loading

0 commit comments

Comments
 (0)