CSD201_-_1_-_FA_2023_-_FE_1030.webp
H

CSD201_-_1_-_FA_2023_-_FE_1030.webp

(Choose 1 answer)
Partitioning is a technique used in quicksort. The following is a partition pseudocode for sorting from smallest to largest:
partition the array a from index low to index up x:= a[low], i=low, j=up do increase i and stop at i, where a[i]>x decrease j and stop at j, where a[j]<=x swap a[low] with a[j]Consider the list of eight integers (n=8) below:6, 4, 9, 10, 8, 3, 7, 5 What is the list after it is partitioned with low = 0 and up = n-1?
if(i<j) swap a[i] with a[j]while(i<j)
A. 3, 4, 5, 6, 7, 8, 10, 9
B. 3, 4, 5, 6, 8, 7, 9, 10
C. 3, 4, 6, 5, 8, 10, 7, 9
D. 3, 4, 5, 6, 8, 10, 7, 9


Exit 30

Thông tin

Category
CSD201
Thêm bởi
happy_smile1
Ngày thêm
Lượt xem
3,795
Lượt bình luận
25
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_1_-_FA_2023_-_FE_1030.webp
File size
58.9 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom