Courses‎ > ‎AP Computer Science 2‎ > ‎Konstantinovich‎ > ‎

2017-03-13

posted Mar 13, 2017, 11:29 PM by Samuel Konstantinovich
Quickselect discussion.

Homework: Write a partition method:

int part ( int [] data, int start, int end){}

-Choose a random element to be a pivot, and partition the array around it. 
-Only partition the elements from start to end inclusive.
-When done returns the index of the final position of the pivot element. (Should be from start to end inclusive)


Comments