Quick Sort Instructor : Prof. Jyh-Shing Roger Jang Designer : Shao-Huan Wang The ideas are reference to the textbook “Fundamentals of Data Structures in C “.
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left.
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j < i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way If j = pivot key, don’t change.
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way If j = pivot key, don’t change.
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way If j = pivot key, don’t change.
Quick Sort R leftright Set an array and add left and right to record the first and last indexes. Take a pivot key at first term Scan from left to right, if the element larger than pivot key, finding a smaller item from right to left. If j <= i (j : right to left; i : left to right), change the j and pivot key. Take the left and right array of pivot key to do the same way If j = pivot key, don’t change.