※ 引述《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.
: 我就留給你自己補完了.
:
:
:
:
: