logo

Crowdly

Browser

Додати до Chrome

Recall selection sort: SelectionSort(a[0..n-1]) i ← 0 WHILE i < n-1 ...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Recall selection sort:

SelectionSort(a[0..n-1])

i ← 0

WHILE i < n-1

        min ← i

        j ← i+1

        WHILE j < n

                IF a[j] < a[min]

                        min ← j

                j = j + 1

        swap the elements of a at positions i and min

        i ← i + 1

 

Consider a selection sort of the following array:

 

01234567891011
LEXICOGRAPHY

 

What is the state of the array at the end of the third iteration of the outer loop?

 

0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle4.city.ac.uk?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome