John Chang
Jedi
Eww, french.
This is an old Microsoft interview question. They love puzzles up there. I could cheat and look it up, but I'm going to be honest. And why would I want to revisit cheating here in my life review anyway? Honesty is always easier anyway.
It's all about angles. The hands will meet up only once per hour, so it's just figuring out where they meet up.
tm = 2*pi*t, where t is in hours (tm is theta(sub)m)
th = 2*pi/12*t + offset (th is theta(sub)h)
offset = 2*pi/12*t1
tm=th
So, let's build the table
t1 = 0, tm = 0, th = 0, t = 0
t1 = 1, tm = 2pi/11, th = 2pi/11, t = 1/11
t1 = 2, tm = 4pi/11, th = 4pi/11, t = 2/11
t1 = 3, tm = 6pi/11, th = 6pi/11, t = 3/11
t1 = 4, tm = 8pi/11, th = 8pi/11, t = 4/11
t1 = 5, tm = 10pi/11, th = 10pi/11, t = 5/11
...
The hands meets up in multiples of 1/11 hours.
This is an old Microsoft interview question. They love puzzles up there. I could cheat and look it up, but I'm going to be honest. And why would I want to revisit cheating here in my life review anyway? Honesty is always easier anyway.
It's all about angles. The hands will meet up only once per hour, so it's just figuring out where they meet up.
tm = 2*pi*t, where t is in hours (tm is theta(sub)m)
th = 2*pi/12*t + offset (th is theta(sub)h)
offset = 2*pi/12*t1
tm=th
So, let's build the table
t1 = 0, tm = 0, th = 0, t = 0
t1 = 1, tm = 2pi/11, th = 2pi/11, t = 1/11
t1 = 2, tm = 4pi/11, th = 4pi/11, t = 2/11
t1 = 3, tm = 6pi/11, th = 6pi/11, t = 3/11
t1 = 4, tm = 8pi/11, th = 8pi/11, t = 4/11
t1 = 5, tm = 10pi/11, th = 10pi/11, t = 5/11
...
The hands meets up in multiples of 1/11 hours.