Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
In the "Optimized" Bubble Sort, what is the purpose of the swapped flag?
To change the sort order from ascending to descending
To swap elements without using a temporary variable
To detect if the array is already sorted and stop the algorithm early
To count the total number of swaps
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!