Download - Sorting techniques Anil Dutt
![Page 1: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/1.jpg)
C-Programming----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorting
![Page 2: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/2.jpg)
TOPICS TO BE COVERED
Introduction to Sorting Bubble Sort
Selection Sort Insertion Sort
![Page 3: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/3.jpg)
Sorting
![Page 4: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/4.jpg)
Sorting…… A fundamental application for computers Done to make finding data (searching)
faster Many different algorithms for sorting One of the difficulties with sorting is
working with a fixed size storage container (array) if resize, that is expensive (slow)
The "simple" sorts run in quadratic time O(N2) bubble sort selection sort insertion sort
4
![Page 5: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/5.jpg)
Sorting…… To arrange a set of items in sequence. It is estimated that 25~50% of all
computing power is used for sorting activities.
Possible reasons: Many applications require sorting; Many applications perform sorting when
they don't have to; Many applications use inefficient sorting
algorithms.
![Page 6: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/6.jpg)
Sorting Applications To prepare a list of student ID, names, and
scores in a table (sorted by ID or name) for easy checking.
To prepare a list of scores before letter grade assignment.
To produce a list of horses after a race (sorted by the finishing times) for payoff calculation.
To prepare an originally unsorted array for ordered binary searching.
![Page 8: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/8.jpg)
Bubble Sort…… Bubble sort examines the array from start
to finish, comparing elements as it goes. Any time it finds a larger element before a smaller
element, it swaps the two. In this way, the larger elements are passed towards
the end. The largest element of the array therefore
"bubbles" to the end of the array. Then it repeats the process for the unsorted portion
of the array until the whole array is sorted.
![Page 9: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/9.jpg)
Bubble Sort…… Bubble sort works on the same general
principle as shaking a soft drink bottle. Right after shaking, the contents are a mixture
of bubbles and soft drink, distributed randomly. Because bubbles are lighter than the soft
drink, they rise to the surface, displacing the soft drink downwards.
This is how bubble sort got its name, because the smaller elements "float" to the top, while
the larger elements "sink" to the bottom.
![Page 10: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/10.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
512354277 101
1 2 3 4 5 6
![Page 11: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/11.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
512354277 101
1 2 3 4 5 6
Swap42 77
![Page 12: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/12.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
512357742 101
1 2 3 4 5 6
Swap35 77
![Page 13: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/13.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
512773542 101
1 2 3 4 5 6
Swap12 77
![Page 14: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/14.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
577123542 101
1 2 3 4 5 6
No need to swap
![Page 15: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/15.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
577123542 101
1 2 3 4 5 6
Swap5 101
![Page 16: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/16.jpg)
"Bubbling Up" the Largest Element
Traverse a collection of elements Move from the front to the end “Bubble” the largest value to the end using
pair-wise comparisons and swapping
77123542 5
1 2 3 4 5 6
101
Largest value correctly placed
![Page 17: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/17.jpg)
An Animated Example
674523 14 6 3398 42
1 2 3 4 5 6 7 8
to_do
index
7
N 8 did_swap true
![Page 18: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/18.jpg)
An Animated Example
674523 14 6 3398 42
1 2 3 4 5 6 7 8
to_do
index
7
1
N 8 did_swap false
![Page 19: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/19.jpg)
An Animated Example
674523 14 6 3398 42
1 2 3 4 5 6 7 8
to_do
index
7
1
N 8
Swap
did_swap false
![Page 20: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/20.jpg)
An Animated Example
674598 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
1
N 8
Swap
did_swap true
![Page 21: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/21.jpg)
An Animated Example
674598 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
2
N 8 did_swap true
![Page 22: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/22.jpg)
An Animated Example
674598 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
2
N 8
Swap
did_swap true
![Page 23: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/23.jpg)
An Animated Example
679845 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
2
N 8
Swap
did_swap true
![Page 24: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/24.jpg)
An Animated Example
679845 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
3
N 8 did_swap true
![Page 25: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/25.jpg)
An Animated Example
679845 14 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
3
N 8
Swap
did_swap true
![Page 26: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/26.jpg)
An Animated Example
671445 98 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
3
N 8
Swap
did_swap true
![Page 27: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/27.jpg)
An Animated Example
671445 98 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
4
N 8 did_swap true
![Page 28: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/28.jpg)
An Animated Example
671445 98 6 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
4
N 8
Swap
did_swap true
![Page 29: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/29.jpg)
An Animated Example
671445 6 98 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
4
N 8
Swap
did_swap true
![Page 30: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/30.jpg)
An Animated Example
671445 6 98 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
5
N 8 did_swap true
![Page 31: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/31.jpg)
An Animated Example
671445 6 98 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
5
N 8
Swap
did_swap true
![Page 32: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/32.jpg)
An Animated Example
981445 6 67 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
5
N 8
Swap
did_swap true
![Page 33: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/33.jpg)
An Animated Example
981445 6 67 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
6
N 8 did_swap true
![Page 34: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/34.jpg)
An Animated Example
981445 6 67 3323 42
1 2 3 4 5 6 7 8
to_do
index
7
6
N 8
Swap
did_swap true
![Page 35: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/35.jpg)
An Animated Example
331445 6 67 9823 42
1 2 3 4 5 6 7 8
to_do
index
7
6
N 8
Swap
did_swap true
![Page 36: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/36.jpg)
An Animated Example
331445 6 67 9823 42
1 2 3 4 5 6 7 8
to_do
index
7
7
N 8 did_swap true
![Page 37: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/37.jpg)
An Animated Example
331445 6 67 9823 42
1 2 3 4 5 6 7 8
to_do
index
7
7
N 8
Swap
did_swap true
![Page 38: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/38.jpg)
An Animated Example
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
7
7
N 8
Swap
did_swap true
![Page 39: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/39.jpg)
After First Pass of Outer Loop
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
7
8
N 8
Finished first “Bubble Up”
did_swap true
![Page 40: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/40.jpg)
The Second “Bubble Up”
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
1
N 8 did_swap false
![Page 41: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/41.jpg)
The Second “Bubble Up”
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
1
N 8 did_swap false
No Swap
![Page 42: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/42.jpg)
The Second “Bubble Up”
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
2
N 8 did_swap false
![Page 43: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/43.jpg)
The Second “Bubble Up”
331445 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
2
N 8 did_swap false
Swap
![Page 44: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/44.jpg)
The Second “Bubble Up”
334514 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
2
N 8 did_swap true
Swap
![Page 45: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/45.jpg)
The Second “Bubble Up”
334514 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
3
N 8 did_swap true
![Page 46: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/46.jpg)
The Second “Bubble Up”
334514 6 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
3
N 8 did_swap true
Swap
![Page 47: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/47.jpg)
The Second “Bubble Up”
33614 45 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
3
N 8 did_swap true
Swap
![Page 48: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/48.jpg)
The Second “Bubble Up”
33614 45 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
4
N 8 did_swap true
![Page 49: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/49.jpg)
The Second “Bubble Up”
33614 45 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
4
N 8 did_swap true
No Swap
![Page 50: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/50.jpg)
The Second “Bubble Up”
33614 45 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
5
N 8 did_swap true
![Page 51: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/51.jpg)
The Second “Bubble Up”
33614 45 67 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
5
N 8 did_swap true
Swap
![Page 52: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/52.jpg)
The Second “Bubble Up”
67614 45 33 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
5
N 8 did_swap true
Swap
![Page 53: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/53.jpg)
The Second “Bubble Up”
67614 45 33 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
6
N 8 did_swap true
![Page 54: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/54.jpg)
The Second “Bubble Up”
67614 45 33 4223 98
1 2 3 4 5 6 7 8
to_do
index
6
6
N 8 did_swap true
Swap
![Page 55: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/55.jpg)
The Second “Bubble Up”
42614 45 33 6723 98
1 2 3 4 5 6 7 8
to_do
index
6
6
N 8 did_swap true
Swap
![Page 56: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/56.jpg)
After Second Pass of Outer Loop
42614 45 33 6723 98
1 2 3 4 5 6 7 8
to_do
index
6
7
N 8 did_swap true
Finished second “Bubble Up”
![Page 57: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/57.jpg)
The Third “Bubble Up”
42614 45 33 6723 98
1 2 3 4 5 6 7 8
to_do
index
5
1
N 8 did_swap false
![Page 58: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/58.jpg)
The Third “Bubble Up”
42614 45 33 6723 98
1 2 3 4 5 6 7 8
to_do
index
5
1
N 8 did_swap false
Swap
![Page 59: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/59.jpg)
The Third “Bubble Up”
42623 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
1
N 8 did_swap true
Swap
![Page 60: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/60.jpg)
The Third “Bubble Up”
42623 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
2
N 8 did_swap true
![Page 61: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/61.jpg)
The Third “Bubble Up”
42623 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
2
N 8 did_swap true
Swap
![Page 62: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/62.jpg)
The Third “Bubble Up”
42236 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
2
N 8 did_swap true
Swap
![Page 63: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/63.jpg)
The Third “Bubble Up”
42236 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
3
N 8 did_swap true
![Page 64: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/64.jpg)
The Third “Bubble Up”
42236 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
3
N 8 did_swap true
No Swap
![Page 65: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/65.jpg)
The Third “Bubble Up”
42236 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
4
N 8 did_swap true
![Page 66: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/66.jpg)
The Third “Bubble Up”
42236 45 33 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
4
N 8 did_swap true
Swap
![Page 67: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/67.jpg)
The Third “Bubble Up”
42236 33 45 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
4
N 8 did_swap true
Swap
![Page 68: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/68.jpg)
The Third “Bubble Up”
42236 33 45 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
5
N 8 did_swap true
![Page 69: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/69.jpg)
The Third “Bubble Up”
42236 33 45 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
5
N 8 did_swap true
Swap
![Page 70: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/70.jpg)
The Third “Bubble Up”
45236 33 42 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
5
N 8 did_swap true
Swap
![Page 71: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/71.jpg)
After Third Pass of Outer Loop
45236 33 42 6714 98
1 2 3 4 5 6 7 8
to_do
index
5
6
N 8 did_swap true
Finished third “Bubble Up”
![Page 72: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/72.jpg)
The Fourth “Bubble Up”
45236 33 42 6714 98
1 2 3 4 5 6 7 8
to_do
index
4
1
N 8 did_swap false
![Page 73: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/73.jpg)
The Fourth “Bubble Up”
45236 33 42 6714 98
1 2 3 4 5 6 7 8
to_do
index
4
1
N 8 did_swap false
Swap
![Page 74: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/74.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
1
N 8 did_swap true
Swap
![Page 75: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/75.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
2
N 8 did_swap true
![Page 76: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/76.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
2
N 8 did_swap true
No Swap
![Page 77: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/77.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
3
N 8 did_swap true
![Page 78: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/78.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
3
N 8 did_swap true
No Swap
![Page 79: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/79.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
4
N 8 did_swap true
![Page 80: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/80.jpg)
The Fourth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
4
N 8 did_swap true
No Swap
![Page 81: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/81.jpg)
After Fourth Pass of Outer Loop
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
4
5
N 8 did_swap true
Finished fourth “Bubble Up”
![Page 82: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/82.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
1
N 8 did_swap false
![Page 83: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/83.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
1
N 8 did_swap false
No Swap
![Page 84: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/84.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
2
N 8 did_swap false
![Page 85: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/85.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
2
N 8 did_swap false
No Swap
![Page 86: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/86.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
3
N 8 did_swap false
![Page 87: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/87.jpg)
The Fifth “Bubble Up”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
3
N 8 did_swap false
No Swap
![Page 88: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/88.jpg)
After Fifth Pass of Outer Loop
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
4
N 8 did_swap false
Finished fifth “Bubble Up”
![Page 89: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/89.jpg)
Finished “Early”
452314 33 42 676 98
1 2 3 4 5 6 7 8
to_do
index
3
4
N 8 did_swap false
We didn’t do any swapping,so all of the other elementsmust be correctly placed.
We can “skip” the last twopasses of the outer loop.
![Page 90: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/90.jpg)
Example: #include <stdio.h> void bubble_sort(long [], long); int main() { long array[100], n, c, d, swap; printf("Enter number of elements:"); scanf("%ld", &n); printf("Enter %ld longegers\n", n); for (c = 0; c < n; c++) scanf("%ld", &array[c]); bubble_sort(array, n); printf("Sorted list in ascending order:n"); for ( c = 0 ; c < n ; c++ ) printf("%ld\n", array[c]); return 0; }
![Page 91: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/91.jpg)
void bubble_sort(long list[], long n) { long c, d, t; for (c = 0 ; c < ( n - 1 ); c++) {
for (d = 0 ; d < n - c - 1; d++) { if (list[d] > list[d+1]) { t = list[d]; list[d] = list[d+1]; list[d+1]= t; } } } }
bubsort1 .c
![Page 92: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/92.jpg)
Selection Sort……
![Page 93: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/93.jpg)
Selection Sort…… Idea:
Find the largest element in the array Exchange it with the element in the
rightmost position Find the second largest element and
exchange it with the element in the second rightmost position
Continue until the array is sorted
![Page 94: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/94.jpg)
Before sorting 14 2 10 5 1 3 17 7
After pass 1 14 2 10 5 1 3 7 17
After pass 2 7 2 10 5 1 3 14 17
After pass 3 7 2 3 5 1 10 14 17
After pass 4 1 2 3 5 7 10 14 17
![Page 95: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/95.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 96: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/96.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 97: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/97.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 98: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/98.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 99: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/99.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 100: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/100.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 101: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/101.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
![Page 102: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/102.jpg)
Selection Sort
5 1 3 4 6 2
Comparison
Data Movement
Sorted
Largest
![Page 103: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/103.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 104: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/104.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 105: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/105.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 106: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/106.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 107: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/107.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 108: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/108.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 109: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/109.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
![Page 110: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/110.jpg)
Selection Sort
5 1 3 4 2 6
Comparison
Data Movement
Sorted
Largest
![Page 111: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/111.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 112: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/112.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 113: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/113.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 114: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/114.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 115: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/115.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 116: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/116.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 117: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/117.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
Largest
![Page 118: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/118.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 119: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/119.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 120: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/120.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 121: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/121.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 122: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/122.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 123: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/123.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
Largest
![Page 124: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/124.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 125: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/125.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 126: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/126.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 127: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/127.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
![Page 128: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/128.jpg)
Selection Sort
2 1 3 4 5 6
Comparison
Data Movement
Sorted
Largest
![Page 129: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/129.jpg)
Selection Sort
1 2 3 4 5 6
Comparison
Data Movement
Sorted
![Page 130: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/130.jpg)
Selection Sort
1 2 3 4 5 6
Comparison
Data Movement
Sorted
DONE!
![Page 131: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/131.jpg)
Example:
#include <stdio.h> main() { int A[20], N, Temp, i, j; printf(" ENTER THE NUMBER OF TERMS...: "); scanf("%d",&N); printf("\n ENTER THE ELEMENTS OF THE ARRAY...:"); for(i=1; i<=N; i++) { scanf("\n\t\t%d", &A[i]); }
![Page 132: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/132.jpg)
for(i=1; i<=N-1; i++) for(j=i+1; j<=N;j++) if(A[i]>A[j]) { Temp = A[i]; A[i] = A[j]; A[j] = Temp; } printf("THE ASCENDING ORDER LIST IS...:\n"); for(i=1; i<=N; i++) printf("\n %d",A[i]); }
selecsort .c
![Page 133: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/133.jpg)
Insertion Sort……
![Page 134: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/134.jpg)
134 Insertion Sort…… Idea: like sorting a hand of playing cards
Start with an empty left hand and the cards facing down on the table.
Remove one card at a time from the table, and insert it into the correct position in the left hand
compare it with each of the cards already in the hand, from right to left
The cards held in the left hand are sorted
these cards were originally the top cards of the pile on the table
![Page 135: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/135.jpg)
135
To insert 12, we need to make room for it by moving first 36 and then 24.
Insertion Sort
6 10 24
12
36
![Page 136: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/136.jpg)
136
6 10 24
Insertion Sort
36
12
![Page 137: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/137.jpg)
137
Insertion Sort
6 10 24 36
12
![Page 138: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/138.jpg)
138 Insertion Sort
5 2 4 6 1 3
input array
left sub-array right sub-array
at each iteration, the array is divided in two sub-arrays:
sorted unsorted
![Page 139: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/139.jpg)
139 Insertion Sort
![Page 140: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/140.jpg)
#include<stdio.h> void main() { int A[20], N, Temp, i, j; printf("ENTER THE NUMBER OF TERMS...: "); scanf("%d", &N); printf("\n ENTER THE ELEMENTS OF THE ARRAY...:"); for(i=0; i<N; i++) { scanf("\n\t\t%d",&A[i]); }
Example:
![Page 141: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/141.jpg)
for(i=1; i<N; i++) { Temp = A[i]; j = i-1; while(Temp<A[j] && j>=0) { A[j+1] = A[j]; j = j-1; } A[j+1] = Temp; } printf("\nTHE ASCENDING ORDER LIST IS...:\n"); for(i=0; i<N; i++) printf("\n%d", A[i]); }
inrsot .c
![Page 142: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/142.jpg)
THANK YOU FOR
LISTENING
![Page 143: Sorting techniques Anil Dutt](https://reader034.vdocuments.us/reader034/viewer/2022050805/55c3fa5fbb61ebb75c8b483d/html5/thumbnails/143.jpg)
THEEND