ExamPlay Dark Logo
로그인

Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 7 - No. 42)

In the provided bubble sort algorithm, what is the purpose of the nested loop (the inner `FOR` loop)?
To set the temperature to a given range.
To compare and swap adjacent elements.
To define the number of elements in the list.
To output the sorted list.

설명

The inner loop compares and swaps adjacent elements in the list, during each pass.

댓글 (0)

댓글을 달려면 로그인하세요
광고
BrainBehindX Inc Logo
©2026; 에 의해 구동 BrainBehindX Inc