반응형
- 피봇 결정시 밸런스 맡게 피봇을 뽑아내는게 퍼포먼스에 중요.
For example, partitioning around 10 in the set {15, 20, 18, 51, 36, 10, 77, 43} results in the unbalanced partitions of {10} and {20, 18, 51, 36, 15, 77, 43}. On the other hand, partitioning around 36 results in the more balanced partitions of {15, 20, 18, 10} and {36, 51, 77, 43}.
- 밸런스 맡게 뽑아내려면,
We can improve partitioning further by randomly choosing three elements and selecting their median as the partition value. This is called the median-of-three method, which virtually guarantees average-case performance.
For example, partitioning around 10 in the set {15, 20, 18, 51, 36, 10, 77, 43} results in the unbalanced partitions of {10} and {20, 18, 51, 36, 15, 77, 43}. On the other hand, partitioning around 36 results in the more balanced partitions of {15, 20, 18, 10} and {36, 51, 77, 43}.
- 밸런스 맡게 뽑아내려면,
We can improve partitioning further by randomly choosing three elements and selecting their median as the partition value. This is called the median-of-three method, which virtually guarantees average-case performance.
반응형