400 câu Trắc nghiệm tổng hợp Cấu trúc dữ liệu và giải thuật có đáp án (Phần 2)

Thủ tục sau áp dụng giải thuật sắp xếp nào? Procedure FBeginFor i:=1 to (n-1) doFor j:=n downto (i+1) doif a[j] < a[j-1] thenbegin tg:=a[j]; a[j]:=a[j-1]; a[j-1]:=tg; end; End;

15/50

Thủ tục sau áp dụng giải thuật sắp xếp nào? Procedure F

Begin

For i:=1 to (n-1) do

For j:=n downto (i+1) do

if a[j] < a[j-1] then

begin tg:=a[j]; a[j]:=a[j-1]; a[j-1]:=tg; end; End;

>

Merge sort

insert sort

Bubble sort

Select sort

Giải thích

Chọn đáp án C