Computer Science, asked by achaware2004, 2 months ago

Using the bubble sort algorithm find the number of Comparisons (C ) and the number of
interchanges (D ) which alphabetize the letters in PEOPLE. (Give the passes also)​

Answers

Answered by anjalin
3

Using Bubble sort to sort the word 'PEOPLE' There are 15 comparisons and 9 interchanges.

Explanation:

Let's sort the word 'PEOPLE' using bubble sort.

Thus the word 'PEOPLE' is al-alphabetically sorted.

It took 15 comparisons and 9 interchanges to sort it.

Similar questions