Insertion Sort in Hindi ??? ????????????????????? ??????????????? ???????????? ???????????? ??????? ?????? ?????? Work ???????????? ???????????? ???????
?????????????????? ?????????????????????, ???????????? ??????????????? ?????? ?????? ??????????????? ????????? ?????????????????? ????????? ?????? ?????? ???????????? Bubble, Selection, Quick ?????? Merge Sort ?????? ???????????? ????????? ????????????????????? ?????? ??????????????? ?????? ?????? ???????????????????????? ?????? ?????? ??????????????? ?????? ???????????? ?????????????????? ?????? ???????????? ?????? ???????????? ?????? ???????????????????????????????????? ??????????????????????????? ?????? ?????????, ??????????????? ????????? ?????? Insertion Sort???
?????? ??????????????? ????????? ???????????? ???????????? ???????????????????????? ??????????????? ???????????? ??????? (What is Insertion Sort in Hindi?), ?????? ????????? ?????? ?????????????????? (Playing Cards) ?????? ????????? ???????????? ????????? ???????????? ??????? ?????? ?????? ???????????? ???????????? ?????? ????????? ???????????? ??????????????? ??????????????? ???????????? ???????????? ??????, ???????????? ???????????? ????????? ????????????????????? ?????? ??????????????? ?????????
????????? ???????????? Bubble Sort ?????? Selection Sort ????????? ??????????????????????????? ???????????? ??????, ?????? Insertion Sort ?????? ??????????????? ?????? ????????? ???????????? ????????? ???????????? ?????? '????????????????????? ????????????????????????' ???????????? ???????????? ?????????
What is Insertion Sort in Hindi? ??? ???????????????????????? ??????????????? ???????????? ???????
Insertion Sort ?????? ????????? ???????????????????????? ??????????????????????????? ?????? ?????? ????????????????????? ???????????? ?????? ????????? ???????????? ?????? ???????????? ?????? ???????????? ????????? ????????? ????????? ?????? ?????????????????? ?????? ??????????????? (sort ????????????) ????????????
?????? ??????????????????????????? ?????????, array ?????? ?????? ????????????????????? ????????? ??????????????? ???????????? ??????:
- Sorted Part: ?????? ???????????? ?????? ????????? ???????????? ????????? ?????? (?????????????????? ????????? ??????????????? ??????????????? ???????????? element ???????????? ??????)???
- Unsorted Part: ???????????? ???????????? ??????????????? sorted part ????????? ????????? ????????? ?????? 'Insert' ???????????? ?????????
?????? Unsorted part ?????? ??????-?????? ???????????? ??????????????? ????????? ?????? ????????? Sorted part ????????? ????????? ????????? ?????????????????? ???????????? fit (insert) ?????? ???????????? ???????????? ?????????????????? ???????????? ????????? Insertion Sort ?????????

The "Playing Cards" Analogy ??? ????????? ???????????? ??????????????????
?????????????????? ?????????????????? ?????? ?????? ????????? (Cards) ????????? ????????? ????????????
- ?????????????????? ????????? ???????????? ????????? ????????? ????????? ??????????????? ???????????? ?????????
- ?????? ???????????? ?????? ???????????? ??????????????? ??????????????? ????????? (???????????? ?????? 5 ??????)???
- ????????? ?????? ??????????????? ??????????????? ??????????????? ????????? (???????????? ?????? 3 ??????)??? ?????? ??????????????? ????????? ?????? 3, 5 ?????? ???????????? ??????, ?????? ?????? 5 ?????? ??????????????? ?????? 3 ?????? ???????????? ????????? ????????? ???????????? ????????????
- ????????? ?????? ???????????? ??????????????? ??????????????? ????????? ?????? ????????? ????????? ????????? ???????????? (insert) ???????????? ????????????
??????, ???????????????????????? ?????? ???????????? ?????? ????????? ????????? ????????? Sort ???????????? ??????!
How Insertion Sort Works in Hindi? ??? ???????????????????????? ??????????????? ???????????? ????????? ???????????? ???????

???????????? ????????? ????????? ?????????????????? ?????? ??????????????? ????????? ??????????????? ???????????????????????? ??????????????? ???????????? ???????????? ???????????? ????????? Array: [5, 3, 8, 1, 2]
Step 1:
- ???????????? element 5 ???????????? ?????? sorted ???????????? ???????????? ?????????
- ?????? ???????????? element 3 ??????????????? ????????????
- ??????????????? ???????????? ?????????: 3, 5 ?????? ???????????? ????????? ?????? ?????? 5 ?????? ????????? ??????????????? ??????????????? ?????? 3 ?????? ???????????? ?????? ??????????????????
- Array: [3, 5, 8, 1, 2]
Step 2:
- ?????? ???????????? element 8 ??????????????? ????????????
- 8, 5 ?????? ???????????? ????????? ?????? ????????? ???????????? ????????? ???????????? ??????????????? (No change) ???
- Array: [3, 5, 8, 1, 2]
Step 3:
- ?????? ???????????? element 1 ??????????????? ????????????
- 1, 8 ?????? ???????????? ?????? -> 8 ??????????????????
- 1, 5 ?????? ???????????? ?????? -> 5 ??????????????????
- 1, 3 ?????? ???????????? ?????? -> 3 ??????????????????
- ?????? ????????? ???????????? ?????? ?????? ???????????? ?????????, ?????? 1 ???????????? insert ?????? ??????????????????
- Array: [1, 3, 5, 8, 2]
Step 4:
- ?????? ??????????????? element 2 ??????????????? ????????????
- ?????? 8, 5 ?????? 3 ?????? ???????????? ??????, ?????? ?????? ?????? ???????????????????????? ?????? 2 ???????????? ????????? ????????? (1 ?????? ?????????) insert ?????? ??????????????????
- Final Sorted Array: [1, 2, 3, 5, 8]
Time Complexity Analysis ??? ?????? ??????????????? ?????????????????? ???????
Insertion Sort ?????? ?????? ???????????? ???????????? ?????????????????? ?????? ?????? ????????? Bubble ?????? Selection Sort ?????? ??????????????? ??????????????? ?????????
1. Best Case: $O(n)$
- ????????? array ???????????? ?????? ?????? sorted ??????, ?????? ????????? ????????? ?????? ???????????? ???????????? ??????????????? (??????????????? ?????? ????????? check ???????????? ??????????????? ??????)??? ?????? ???????????? fast ?????????
2. Worst Case: $O(n^2)$
- ????????? array ??????????????? (reverse) sorted ??????, ?????? ????????? ?????? element ?????? ????????????????????? ?????????????????????
3. Average Case: $O(n^2)$
Space Complexity: $O(1)$ (In-place sorting)???
When to use Insertion Sort in Hindi? ??? ????????????????????? ??????????????? ?????? ??????????????? ?????? ?????????????
????????? ?????? ?????? Merge Sort ??????????????? fast ???????????? ??????, ??????????????? ????????? situations ????????? ?????? ???????????? (King) ??????:
- Small Dataset: ?????? elements ?????? ????????? (10-20), ?????? ?????? Quick Sort ?????? ?????? ????????? ????????? ???????????? ?????????
- Almost Sorted Data: ????????? ???????????? ????????? ?????? ?????? ??????????????? ???????????? sorted ?????? (?????? 1-2 elements ????????? ????????? ?????????), ?????? Insertion Sort ???????????? ????????????????????? choice ?????????
- Online Algorithm: ?????? ???????????? ????????????-???????????? ??? ????????? ?????? (Live data feed), ?????? ?????? ???????????? ????????? ?????? ????????? ??????????????? sort ?????? ???????????? ?????????
Conclusion ??? ????????????????????????
???????????? ?????????????????? ?????? ?????? ?????? ??????????????? ?????? ???????????? Insertion Sort in Hindi (????????? ???????????? ???????????????) ??????????????? ????????? ????????? ???????????? ??????????????? ????????????????????? ????????? ???????????? ??????, ?????? Bubble Sort ?????? Selection Sort ?????? ?????????????????? ????????????????????? ?????? ????????????????????? ?????? ???????????? ?????? sorted ???????????? ?????? ????????? ??????????????? ?????? (Adaptive Nature) ???
????????? ???????????? ?????? ??????????????? ???????????? ?????? ?????? ?????? ????????? ???????????? ????????????????????? ?????? ????????? ???????????? ???????????? ??????????????? ?????? ?????? ???????????? ??????????????? ????????? Searching Algorithms (Linear vs Binary) ?????? ???????????? ????????? ????????? ?????????????????????
FAQs
Q1. Insertion Sort ?????? Bubble Sort ????????? ???????????? ???????????? ???????
Ans: Bubble sort ????????? ?????? elements ?????? ?????????-????????? swap ???????????? ?????????, ???????????? Insertion sort ????????? ?????? elements ?????? shift (?????????????????????) ????????? ?????? ????????? ????????? ?????? insert ???????????? ????????????
Q2. ???????????? Insertion Sort ???????????? ????????? ???????
Ans: ????????????, ???????????? ???????????? ?????? ????????? Quick Sort ?????? Merge Sort ????????? ???????????? ??????????????? ???????????? ???????????? ???????????? (small arrays) ?????? ????????? Insertion Sort ???????????? ????????? ?????? ???????????? ?????????
Q3. Best Case Time Complexity ???????????? ???????
Ans: ????????? ???????????? ???????????? ?????? sorted ??????, ?????? ???????????? Complexity $O(n)$ ???????????? ??????, ?????? ?????? ???????????? ????????????????????? ?????????