Skip to content

Commit 8612a65

Browse files
committed
feat:<Merge sort> merge sort flowchart and example add
1 parent ded44da commit 8612a65

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

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.`,
1 MB
Loading
178 KB
Loading

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

180 KB
Loading

0 commit comments

Comments
 (0)