How to solve Google's clock hands interview riddle

preview_player
Показать описание
This is a simple interview riddle that has been asked at tech companies like Amazon, Microsoft, and Google and even at investment banks like Goldman Sachs. How many times do the hands of a clock overlap in a day? What are the times? (round to the nearest second)

0:00 problem
3:03 answer
6:02 solution 1
7:46 solution 2
10:10 solution 3
12:45 solution 4

References

Send me suggestions by email (address at end of many videos). I may not reply but I do consider all ideas!

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

Book ratings are from January 2023.

My Books (worldwide links)

My Books (US links)
Mind Your Decisions: Five Book Compilation
A collection of 5 books:
"The Joy of Game Theory" rated 4.3/5 stars on 290 reviews
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" rated 4.1/5 stars on 33 reviews
"40 Paradoxes in Logic, Probability, and Game Theory" rated 4.2/5 stars on 54 reviews
"The Best Mental Math Tricks" rated 4.3/5 stars on 116 reviews
"Multiply Numbers By Drawing Lines" rated 4.4/5 stars on 37 reviews

Mind Your Puzzles: Collection Of Volumes 1 To 3
A collection of 3 books:
"Math Puzzles Volume 1" rated 4.4/5 stars on 112 reviews
"Math Puzzles Volume 2" rated 4.2/5 stars on 33 reviews
"Math Puzzles Volume 3" rated 4.2/5 stars on 29 reviews

2017 Shorty Awards Nominee. Mind Your Decisions was nominated in the STEM category (Science, Technology, Engineering, and Math) along with eventual winner Bill Nye; finalists Adam Savage, Dr. Sandra Lee, Simone Giertz, Tim Peake, Unbox Therapy; and other nominees Elon Musk, Gizmoslip, Hope Jahren, Life Noggin, and Nerdwriter.

My Blog

Twitter

Instagram

Merch

Patreon

Press
Рекомендации по теме
Комментарии
Автор

So many people are doing this problem wrong. Step one: create a pre-planning meeting to establish a strategy for acquiring a random sample of different clocks. … step fourteen: determine which of the squired clocks comply with the ethical sourcing standards we were supposed to be using, discarding the rest …. step one hundred-four: apply for an out-of-budget request for an additional $1.2 million for the overtime required to prepare for the pre-meeting for the project ….step fifteen-thousand, six-hundred, forty-one: submit the final version of the 4, 231-page environmental impact report to the internal review committee, now in the correct font.

michaelwinter
Автор

Finally, a question that doesn’t fall back on semantics or ambiguous wording.

StephenByersJ
Автор

I remember that some old analog clocks don't have continuous movement on the minute hand, instead it skips forward in one minute increments. In fact the ratchet mechanism involved causes the hand to sweep back a few degrees for a moment before it snaps forward to the next minute. In this case you could have the hands overlap upto 3 times in an hour, depending on where the hour hand is compared to the distance of the back sweep.
The snarky solution to puzzle is that the hands are always overlapped when you consider the center point.

mudfarmer
Автор

The fact that you can form an infinite series, is an amazing illustration of how mathematicians defined real numbers, it's a limit of rational numbers, even though the minute hand eventually catches up, but that time stamp is never a precise one

Kevin-vnnq
Автор

Fun fact. I warned my employers corporate recruiter not to try any of this bullcrap with me. Worded it more professionaly and politely than that. Showed up for the physical interview and at the end of our conversation she comes up with one of these conundrums. I shook her hand, got up and thanked her for her time. I was called in the next 2 hours that I got the position as I was the first person that outright declined to participate and did so gracefully. And they needed someone that wasnt afraid to go against the grain.

DutchManticore
Автор

This is analogous to a general fact in astronomy, where there is 1 more sidereal days or months than synodic days or months per year (given the rotation of the planet around its axis is the same as around the sun, which is not true for Venus). Here a "synodic hour" is an overlap and a "sidereal hour" is a normal hour. Thus 11 "synodic hours" per one "clock year" or 11 overlaps for half a day.

baymarin
Автор

The linear graph way you used to solve this is really neat!

JustinGrammens
Автор

I used to think of this problem as a child. It is like the Achilles-tortoise parable. Think of 1 o'clock. the hour hand is the tortoise and Achilles is the minute hand. The minute hand will pass the hour hand even though it subdivides into an infinite number of increments. As in your last solution.

krabkrabkrab
Автор

The hands ALWAYS overlap. One hand is mounted above the other. That's the way analog clocks work.

sprocket
Автор

I once tried doing this seemingly interesting topic as early as 5th grade when I tried it manually for times when hour and minute hand overlap.
Anyways, recently in college (3rd year), we are being taught Aptitude where this clock topic also came.

And during 5th grade, I did it this way:
The hands will overlap between (starting at 12 PM):
1-2 PM
2-3 PM
3-4 PM
4-5 PM
5-6 PM
6-7 PM
7-8 PM
8-9 PM
9-10 PM
10-11 PM
at 12 AM

11 times in 12 hours, so 22 times in 24 hours.
12/11=1.0909
Multiply decimal part by 60 for minutes and decimal of resultant by 60 for seconds.
So about 1 hour, 5 min, 27 sec.

sparshsharma
Автор

Writing this before I watch the video.

If you just want the number of times, you can quickly recognize that you only need to consider the first 12 hours because the next 12 hours are duplicated positions. Then, your logic of "subtract 1 for the minute hand passing the hour hand" does indeed give you the correct number of 11 times in a half day. Thus, there are 22 overlaps in a day.

If you want the actual times, use basic modular arithmetic.

Using the hour ticks as the unit of circular distance and denoting time passed T in units of hours, the hour hand travels at a rate of T and the minute hand travels at a rate of 12T (so example, when T = 1.5, then 1.5 hours has passed, the hour hand traveled 1.5 units and the minute hand traveled 18 units). The hour and minute hand are lined up when 12T = T mod 12, or in other words, when 11T = 0 mod 12. So just start enumerating the instances:
11T = 0 -> T = 0. So at 00:00, they line up.
11T = 12 -> T = 12/11. So when 12/11 hours passed, they line up again (the time would be 01:05.27)
At this point, you can keep going or just recognize that you can get the rest of the answers by adding an additional time delta of 01:05.27.

Keep on finding solutions for as long as T < 24 and you'll see that there are only 22 values of T which can satisfy the modular equation.

titfortat
Автор

1:50 If you're initially assuming once for every hour of the day then that would be 24, one each for the 24 hours from 0 to 23 using 24 hour clock, so one of the midnights is already not included, otherwise you'd start with 25 hours in a day (0-23 and another 0) and subtract 1 to get 24.

MrDannyDetail
Автор

This problem has a special place in my heart and still irks me to this day. Not sure where I first met it in HS, but the same as presented here. It didn't specify how many hands (I thought Hour / Minute / Second) as the question also specified find to the nearest second. So I went about solving it as though all 3 hands had to overlap =____=, got it wrong even though i thought it was kind of straight forward.

per min:
hour hand (0.5 degrees) | min hand (6 degrees) | sec hand (360 degrees)
relative speed (hour v min) 5.5 / min >> 360/5.5 = 720/11 to overlap (720 mins is 12 hrs, so every 12 hours there are 11 overlap)

relative speed (hour v sec) 0.5 / min >> 360/0.5 = 720 to overlap ... so once everyone 12 hours...

so all three overlap at exactly noon and midnight, twice.

aside: Saw this question again at at some years later (prob interview, don't remember), and remembering that it was poorly worded, i calculated the total overlaps (second v min, second v hour, min v hour) and got it wrong again

vinni
Автор

Got it right the first time. I went empirically through the meeting points and no later than near the bottom of the clock I realized we can't have the minutes hand at the half hour mark and the hour hand at the full 6th hour mark. Then I sketched it up on a sheet of paper and saw that the meeting point happens at 12:00 as well as intermediately between every two hours except the first and the last.
This puzzle reminds me of the fact that even though we colloquially know that Earth rotates 365 days per year, making 365 days, it actually rotates 366 times per year if you look at it from a fixed reference frame outside of the solar system. Our reference frame normally is fixated on the sun, so it rotates one turn per year, adding one turn to the 365 turns we observe relative to the sun.

MrSaemichlaus
Автор

I got 1 Hour, 5 minutes, 27 seconds for the overlapping hands interval (assuming no second hand), and the hands overlap 11 times over 12 hours, and 22 times over the course of a full day.

Skyfighter
Автор

The best part of the solution is your presentation of four methods. Method 2 is simple and surprises me.

coshy
Автор

Following the idea of one of the comments. In 24 hours, the minute hand runs 24 circles, the hour hand runs 2 circles, so the minute hand overpasses the hour hand 24-2 = 22 times, or in other words, they overlap 22 times. The interval between two overlaps is apparently a constant, so the interval is 24/22 hours (h), or 12/11 (h), which is 1 hour 5 minutes 27 and 3/11 seconds, and the kth overlap simply corresponds to the time (12/11)k (h), k = 1, 2, 3, ..., 22. When k = 11, it is the noon time; when k = 22, it is the end of the day, or 24 (h). k can take the value 23 or more, but they represent overlaps of the next day.

qqqquito
Автор

minute-hand runs 24 laps, hour-hand runs 2 laps, so minute-hand run by hour-hand 22 times (24-2).

PugganBacklund
Автор

This is neat, to solve this puzzle with so many approaches

NFxVIPER
Автор

I tackled this in a pretty similar way to solution 3. Let's say x is how many ticks the minute hand covers. The hour hand has some head start 5h, where h is the hour (ex. 1pm = 5 ticks, 3pm = 15 ticks) + x/12 which is how many ticks the hour hand covers past its head start, since it's 1/12 as fast. We can use x = 5h + x/12 to find where the minute hand will be when it covers as many ticks as the hour hand- in other words, when they meet. Doing a bit of algebra gets us 11x/12 = 5h, or x = 60h/11, where h is the hour. Just plug the hours into the equation and you have your answer (ex. if the hour is 2, x = 120/11 ticks or 10 + 10/11 minutes)

markmolayal
welcome to shbcf.ru