| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 11944 | (電機系呂老師班上機考) Partition Step of QuickSort |
|
Description
- Given
- List of distinct integers
- Required order: ascending (由小到大) or descending (由大到小)
- 測資 1~6 是 ascending (由小到大),佔120%
- 測資 7~8 是 descending (由大到小),佔40%
- 測資 1 就是 sample input/output
- Perform the partition step of QuickSort once
- Use the last number as the pivot
- Do swaps to partition the list according to the pivot
- Print out the list
- Ascending (由小到大) Example
- Descending (由大到小) Example