由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 微软一道 智力题
相关主题
how to detect memory leakBloomberg电面面经附加问题
An interview question (Detect cycles in a sequence of numbers)关于delete的一个问题
问个简单的atoi的问题大家看了FanLaw写的帖子了吗
问个大数据的问题 (转载)fraud detection的前景怎么样?
微软面试100题(上)面经
移民局防范H1B造假行为的准则h1b费用上升是利好还是利空?
问一题ICC们要大出血了
问一道java题H1b visa的申请费是不是增加到$4500?
相关话题的讨论汇总
话题: sensor话题: white话题: clockwise话题: black话题: detect
进入JobHunting版参与讨论
1 (共1页)
h*****g
发帖数: 312
1
假设一张圆盘像唱机上的唱盘那样转动。这张盘一半是黑色,一半是白色
。假设你有数量不限的一些颜色传感器。要想确定圆盘转动的方向,你需要在它周
围摆多少个颜色传感器?它们应该被摆放在什么位置?
q****x
发帖数: 7404
2
直觉是多少个都不够,对否?

【在 h*****g 的大作中提到】
: 假设一张圆盘像唱机上的唱盘那样转动。这张盘一半是黑色,一半是白色
: 。假设你有数量不限的一些颜色传感器。要想确定圆盘转动的方向,你需要在它周
: 围摆多少个颜色传感器?它们应该被摆放在什么位置?

h*********n
发帖数: 11319
3
3?

【在 h*****g 的大作中提到】
: 假设一张圆盘像唱机上的唱盘那样转动。这张盘一半是黑色,一半是白色
: 。假设你有数量不限的一些颜色传感器。要想确定圆盘转动的方向,你需要在它周
: 围摆多少个颜色传感器?它们应该被摆放在什么位置?

l*********8
发帖数: 4642
4
两个应该够了。sensor 1放在时钟三点的位置,sensor 2放在四点的位置。
if sensor 1 leads sensor 2
clockwise
else
counterclockwise
l***n
发帖数: 542
5
This is absolutely wrong. The sensors sense simultaneously, so you cannot
tell who leads who.
You can only detect who detect white or black first. So you need 3 sensors.
First place sensor 1, then sensor 2 is placed in a position with clockwise
angle less than 180 degree, then place sensor 3 with clockwise angle more
than 180 degree.
For the three sensors, there must be two detecting the same color, the other
detecting the other color.

【在 l*********8 的大作中提到】
: 两个应该够了。sensor 1放在时钟三点的位置,sensor 2放在四点的位置。
: if sensor 1 leads sensor 2
: clockwise
: else
: counterclockwise

l***n
发帖数: 542
6
Just one example,
When 2 detects white, 1 and 3 detects black. Then we can check whether 1 or
3 detects white first. If 1 detects white first, counterclockwise;
otherwise clockwise.
The reason to add another sensor is to add a pivot for checking what color
should be detected for the next time. (You should determine what color you
detect next time, then you can tell who leads who)

.
other

【在 l***n 的大作中提到】
: This is absolutely wrong. The sensors sense simultaneously, so you cannot
: tell who leads who.
: You can only detect who detect white or black first. So you need 3 sensors.
: First place sensor 1, then sensor 2 is placed in a position with clockwise
: angle less than 180 degree, then place sensor 3 with clockwise angle more
: than 180 degree.
: For the three sensors, there must be two detecting the same color, the other
: detecting the other color.

l***n
发帖数: 542
7
If there are only two sensors, suppose the direction is clockwise,
Suppose for the first time 1 and 2 simultaneously detect black,
if 1 is closer to black-white edge, then 1 detect white first; if 2 is
closer to the black-white edge, then 2 detect white first. So you can never
tell the direction is clockwise
l***n
发帖数: 542
8
Sorry, I was wrong about something. The reason to add another sensor is to
add a pivot for checking who is closer to the black-white edge. And another
condition is that the angle between sensor 2 and sensor 3 should also be
less than 180 degree in clockwise. For instance, the sensor 1, 2 3 can
evenly distribute on the circle with 120 degree between each pair. So the
sequence wwb->wbw (or bww) can tell the rotation direction.
e***s
发帖数: 799
9
0点,4点,8点
04,48,08...clockwise
04,08,48...counterclockwise.
p******e
发帖数: 371
10
题目没有提供圆盘的转速和sensor的采样频率。
如果转速>>采样频率,放多少sensor都不行。
如果采样频率>>转速,两个就够了,只要别相隔180度。
相关主题
移民局防范H1B造假行为的准则Bloomberg电面面经附加问题
问一题关于delete的一个问题
问一道java题大家看了FanLaw写的帖子了吗
进入JobHunting版参与讨论
l***n
发帖数: 542
11
Similar to this.

【在 e***s 的大作中提到】
: 0点,4点,8点
: 04,48,08...clockwise
: 04,08,48...counterclockwise.

w****9
发帖数: 18
12
I think one sensor should be good to go. let's say the music disc spin 0.5
circle/per second, and the sensor sampling interval is 10ms , use 3
sampling to remove the noise to decide current status or status change. we
define the status to be the zone current sensor is in, white, black, and
also transition from "white to black " and "black to white" could be
detected. it is similar to key board scanning to detected the key pressed
and released
h******k
发帖数: 19
13
sensor采样频率要大于转速两倍才行

【在 p******e 的大作中提到】
: 题目没有提供圆盘的转速和sensor的采样频率。
: 如果转速>>采样频率,放多少sensor都不行。
: 如果采样频率>>转速,两个就够了,只要别相隔180度。

O*2
发帖数: 178
14
yes

【在 h******k 的大作中提到】
: sensor采样频率要大于转速两倍才行
c****l
发帖数: 1280
15
mark
e***s
发帖数: 799
16
agree, sampling 要比转速快才行。不然都是浮云
R****i
发帖数: 104
17
Nyquest 频率
L*******r
发帖数: 8961
18
微软很无聊!以为人人都从幼儿园里来。
1 (共1页)
进入JobHunting版参与讨论
相关主题
H1b visa的申请费是不是增加到$4500?微软面试100题(上)
受人之托,贴三个职位 (转载)移民局防范H1B造假行为的准则
郁闷的问:现在办H1B究竟多少钱问一题
攒人品,有三个mid-office quant positions (2 equities, 1 credit)问一道java题
how to detect memory leakBloomberg电面面经附加问题
An interview question (Detect cycles in a sequence of numbers)关于delete的一个问题
问个简单的atoi的问题大家看了FanLaw写的帖子了吗
问个大数据的问题 (转载)fraud detection的前景怎么样?
相关话题的讨论汇总
话题: sensor话题: white话题: clockwise话题: black话题: detect