※ 引述《Leon (Achilles)》之铭言:
:
: 这题是考 怎么找 Median, 你可以用 Quick Sort 的变形去找.
:
: 你先考虑一下简单的题目:
: 要是有 9 cars, and has a run way with 3 laps
: How to do it?
:
: First round: do a run with 3 cars, we need 3 games.
:
: Second round: We pick the 'median' of the first round,
: thus, we will have `median of the median'.
:
: We call it X.
:
: Now, we are sure 3 cars are faster than X, 3 cars are slower than X.
: 2 cars are unknown.
:
: Third round will be X and 2 unkonws.
:
: 用这个 Median of Median 的原理, 你就能解那个 49 cars case.
: 我就留给你自己补完了.
:
:
:
:
: