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 F(a, t, s);Begin B:= true;if twhile b do begini:=i+1; while a[i]=key do j:=j-1;if ibegin tg:=a[i]; a[i]:=a[j]; a[j]:=tg; endelse b:=fals

18/50

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

Begin B:= true;

if twhile b do begin

i:=i+1; while a[i]<=key do i:=i+1; j:=j -1; while a[j]>=key do j:=j-1;=key>

if i<="" br="">begin tg:=a[i]; a[i]:=a[j]; a[j]:=tg; end="">

else b:=false; end;

tg:=a[t]; a[t]:=a[j]; a[j]:=tg; call F(a, t,j-1);

cal F(a, j+1,s); end;

End;

Quick sort

Insert sort

Merge sort

Bubble sort

Giải thích

Chọn đáp án A