CSD201_-_FA_2024_-_FE_-_C1_2980.webp
T

CSD201_-_FA_2024_-_FE_-_C1_2980.webp

  • Media owner Thu Hà1
  • Ngày thêm
(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 if(i<j) swap a[i] with a[j]while(i<j)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?
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

41

Thông tin

Category
CSD201
Thêm bởi
Thu Hà1
Ngày thêm
Lượt xem
6,659
Lượt bình luận
23
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_FA_2024_-_FE_-_C1_2980.webp
File size
233.3 KB
Dimensions
1920px x 1012px

Share this media

Back
Bên trên Bottom