Tech corporations attempt to preserve their interview questions secret, in order that potential staff can’t put together solutions upfront. Candidates reclaim the facility by sharing their interview experiences publicly on web sites like Glassdoor and CareerCup. Consequently, what had been supposed as boards to assist profession hopefuls navigate the job market have turn out to be like a WikiLeaks for puzzle lovers. This week, I’m declassifying Bezos’s paperwork and delivering them straight to your browser window, with free delivery, after all.
Our first puzzle comes from a Software program Engineer interview, based on a submit on CareerCup. It has a neat premise: labeling the faces on a clean die to realize a given objective, however in case you remedy it too shortly I’ve supplemented it with two bonus puzzles that additionally discover clean cube.
Did you miss final week’s puzzle? Test it out right here, and discover its resolution on the backside of right now’s article. Watch out to not learn too far forward should you haven’t solved final week’s but!
Puzzle #44: Clean Cube
Amazon interview query: For those who roll two typical cube and sum their outcomes, you’ll get a quantity between 2 and 12. Nonetheless, not each quantity is equally possible (e.g. you’ll solely get a 2 should you roll snake eyes, whereas 7s will come up usually). Suppose you could have one regular die and one clean die (a small dice with no numbers on it). Label the clean die with some subset of the numbers 0, 1, 2, 3, 4, 5, 6 in order that whenever you roll each cube, all sums from 1 to 12 are equally possible. You should label each face of the clean die, and it’s possible you’ll repeat numbers.
Bonus questions about clean cube, courtesy of Dmitry Kamenetsky: Given two clean cube A and B, label them with the digits 1 by means of 12 as soon as every (no repeats) in order that whenever you roll them, there’s a 50% probability that A rolls greater than B and a 50% probability that B rolls greater than A.
Label three clean cube utilizing the digits 1 by means of 18 as soon as every (no repeats) in order that whenever you roll them, every die has an equal probability of being the best.
Though these may seem to be a tedious train in trial and error, all of them have fairly intuitive options. I discovered the final downside significantly satisfying, however it’s important to work as much as it by fixing the smaller case first.
I’ll be again Monday with the solutions and a brand new puzzle. Are you aware a cool puzzle that you simply assume ought to be featured right here? Message me on X @JackPMurtagh or electronic mail me at [email protected]
Resolution to Puzzle #43: Anarchy Tic-tac-toe
Did you determine find out how to crush me in final week’s tic-tac-toe variant? The primary participant can all the time pressure a win as follows. Shout-out to Kari Roth for emailing an ideal resolution full with diagrams. Kari writes:
The twist on this variation is that you’re not really attempting to play three-in-a-row however attempting to pressure the opposing participant to play two-in-a-row with an empty third place within the row.
Good perception. Right here’s how participant one wins.
Begin within the middle. The image doesn’t matter, so let’s say you start with X. Now I can not place an X in any free sq. as a result of it could provide you with a three-in-a-row on the subsequent flip. I have to place an O and there are solely two choices: a nook cell or an edge cell (which nook or which edge doesn’t matter as a result of the board is symmetric).
If I select a nook cell, then you definitely’ll place an O within the reverse nook:
Now I’m in zugzwang, which is a time period which means that each authorized transfer places me at a drawback. My finest transfer can be to cross, however the guidelines obligate me to maneuver. It doesn’t matter what cell I choose and which image I place in it, I’ll open up a three-in-a-row for you.
If as an alternative I place an O in an edge on my first transfer, then you definitely’ll comply with the same technique and place an O on the alternative edge:

Right here, the one manner I can keep away from providing you with a win in your subsequent flip is to put an O in one of many remaining edge cells. Once more you’ll mirror it and put me in zugzwang:

All strikes for me lose. So the primary participant can all the time pressure a win in anarchy tic-tac-toe by opening within the middle after which mirroring their opponents strikes till they’ve a profitable alternative.









