Sorting algorithms/Quicksort: Difference between revisions

Fixed mistake in the Ada implementaion
(Fixed mistake in the Ada implementaion)
Line 175:
exit when Left >= Right;
Swap(Item(Left), Item(Right));
if LeftPivot_Index <= Item'Last and Right > Item'FirstLeft then
Left Pivot_Index := Index_Type'Succ(Left)Right;
elsif Pivot_Index = Right := Index_Type'Pred(Right);then
Pivot_Index := Left;
end if;
end loop;
Anonymous user