h*****g 发帖数: 312 | 1 Programming Interviews Exposed 第二版 176页
“From the time you get on a ski lift to the time you get
off, what proportion of the chairs do you pass?” Most people’s immediate
gut-level response is that you pass
half of the chairs. This response is obvious and makes some sense. At any
given time, half of the chairs are
on each side of the lift, and you pass chairs only on the other side. It’s
also wrong - because both sides of the
lift are moving, you pass all the other chairs.
这道题啥意思?
知道的能不能帮着解答一下。
谢了~ | r********e 发帖数: 122 | | g*******s 发帖数: 490 | 3 就是滑雪缆车,你从这一头坐到那一头,一路上,从缆绳的另一边过去的chair,答案
就是全部,很容易理解。
s
【在 h*****g 的大作中提到】 : Programming Interviews Exposed 第二版 176页 : “From the time you get on a ski lift to the time you get : off, what proportion of the chairs do you pass?” Most people’s immediate : gut-level response is that you pass : half of the chairs. This response is obvious and makes some sense. At any : given time, half of the chairs are : on each side of the lift, and you pass chairs only on the other side. It’s : also wrong - because both sides of the : lift are moving, you pass all the other chairs. : 这道题啥意思?
| g*****k 发帖数: 623 | 4 这个很容易理解的,应该是经过所有的椅子,
其实这道题给你点时间,很容易就想清楚了。
如果实在不行,就拿根绳子模拟下了。
s
【在 h*****g 的大作中提到】 : Programming Interviews Exposed 第二版 176页 : “From the time you get on a ski lift to the time you get : off, what proportion of the chairs do you pass?” Most people’s immediate : gut-level response is that you pass : half of the chairs. This response is obvious and makes some sense. At any : given time, half of the chairs are : on each side of the lift, and you pass chairs only on the other side. It’s : also wrong - because both sides of the : lift are moving, you pass all the other chairs. : 这道题啥意思?
|
|