- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I have to prove the correctness of the function Partition of the Quicksort algorithm.
What am I supposed to do?? (Wondering)
What does it mean to prove the correctness?? (Wondering)
I have to prove the correctness of the function Partition of the Quicksort algorithm.
Code:
begin
i<-f
j<-l
while i<=j do
begin
while A[j]>=a and j>=f do j<-j-1;
while A[i]<a and i<=l do i<-i+1;
if i<j then
begin
interchange A[i] and A[j];
i<-i+1;
j<-j-1;
end
end
end
What am I supposed to do?? (Wondering)
What does it mean to prove the correctness?? (Wondering)