Skip to content

Commit 8876e60

Browse files
authored
Merge pull request #137 from raj-rathod/rajesh
feat:<Insertion sort> insertin sort flow chart and readme file add
2 parents e892d87 + ded44da commit 8876e60

File tree

8 files changed

+77
-8
lines changed

8 files changed

+77
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ graph TD;
5959
- ### Algorithms
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)
62-
- Insertion Sort
62+
- [Insertion Sort](https://github.com/raj-rathod/DSA-visualisation-in-angular/tree/main/src/app/components/Algorithms/sorting/insertion-sort/README.md)
6363
- Merge Sort
6464
- Quick Sort
6565
- Counting Sort
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
## Insertion Sort | Insertion Sort Properties | Insertion Sort Applications | Insertion Sort Visualization | Insertion Sort Complexity | Insertion Sort Space Complexity
23+
24+
### What is Insertion Sort ?
25+
26+
>Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the correct position in the sorted part
27+
28+
### Insertion Sort Flowchart
29+
- Iterate from arr[1] to arr[N] over the array
30+
- Compare the current element (key) to its predecessor
31+
- If the key element is smaller than its predecessor, compare it to the elements before. Move the greater elements one position up to make space for the swapped element
32+
33+
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/insertion-sort-flowchart.jpg?raw=true">
34+
35+
<br>
36+
37+
### Insertion Sort Example
38+
39+
<br>
40+
41+
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/insertion-sort.jpg?raw=true">
42+
43+
## [Learn More About Insertion Sort 👈](https://raj-rathod.github.io/DSA-visualisation-in-angular/)
44+
45+
46+
## Contributing
47+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
48+
Please read the [Contribute guide](.github/CONTRIBUTING.md)
49+
50+
51+
## Connect with me ~Rajesh Rathore
52+
53+
[![Linkedin Badge](https://img.shields.io/badge/-LinkedIn-0e76a8?style=flat-square&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/rajesh-rathore-0501/)
54+
[![Website Badge](https://img.shields.io/badge/Website-3b5998?style=flat-square&logo=google-chrome&logoColor=white)](https://linktr.ee/rajesh_rathore)
55+
[![Twitter Badge](https://img.shields.io/badge/-Twitter-00acee?style=flat-square&logo=Twitter&logoColor=white)](https://twitter.com/Rajesh946055)
56+
[![Instagram Badge](https://img.shields.io/badge/-Instagram-e4405f?style=flat-square&logo=Instagram&logoColor=white)](https://www.instagram.com/raj_rathod1313/?hl=en)
57+
58+
59+
***Do star, fork and share the repo to show your support, it would help others too!*** <br>
60+
<br>
61+
Let me know your views or any changes or improvements or contribute to make better for others
62+
63+
:heart: ***Thank you all for Forking this repository and contribute*** :heart:

src/app/components/Algorithms/sorting/insertion-sort/insertion-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">Insertion Sort</h1>
22
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.defination"></div>
3-
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.explainImage"></div>
4-
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.properties"></div>
5-
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.flowChart"></div>
63
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.workingProcedure"></div>
4+
<div class="mt-md-4 mt-3 col-md-7" [innerHtml]="insertionSortMetaData.flowChart"></div>
5+
<div class="mt-md-4 mt-3 col-md-7" [innerHtml]="insertionSortMetaData.explainImage"></div>
6+
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.properties"></div>
77
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.applications"></div>
88
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.other"></div>
99
<div class="mt-md-4 mt-3" [innerHtml]="insertionSortMetaData.advantage"></div>

src/app/components/Algorithms/sorting/selection-sort/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ _If you like this project, please leave me a star._ &#9733;
2626
>Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list.
2727
The smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. This process continues moving unsorted array boundary by one element to the right
2828

29-
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/selection-sort.jpg?raw=true">
30-
3129
### Selection Sort Flowchart
3230

3331
- Initialize minimum value(minValue) to location 0.
@@ -38,6 +36,14 @@ The smallest element is selected from the unsorted array and swapped with the le
3836

3937
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/selection-sort-flowchart.jpg?raw=true">
4038

39+
<br>
40+
41+
### Selection Sort Example
42+
43+
<br>
44+
45+
<img src="https://github.com/raj-rathod/DSA-visualisation-in-angular/blob/main/src/assets/ds-image/selection-sort.jpg?raw=true">
46+
4147
## [Learn More About Selection Sort 👈](https://raj-rathod.github.io/DSA-visualisation-in-angular/)
4248

4349

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ const insertionSortData = {
107107
defination: `Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards
108108
in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part
109109
are picked and placed at the correct position in the sorted part`,
110-
flowChart:"assets/ds-image/DSA-404.webp",
111-
explainImage:"assets/ds-image/DSA-404.webp",
110+
flowChart:"assets/ds-image/insertion-sort-flowchart.jpg",
111+
explainImage:"assets/ds-image/insertion-sort.jpg",
112112
workingProcedure:[
113113
'Iterate from arr[1] to arr[N] over the array',
114114
'Compare the current element (key) to its predecessor',
111 KB
Loading
157 KB
Loading
-3.5 KB
Loading

0 commit comments

Comments
 (0)