I try to understand a formula when we should use quicksort. For instance, we have an array with N = 1_000_000 elements. If we will search only once, we sho
You want to solve inequality that rougly might be described as
t * n > C * n * log(n) + t * log(n)
where t
is number of checks and C
is some constant for sort implementation (should be determined experimentally). When you evaluate this constant, you can solve inequality numerically (with uncertainty, of course)