If you are applying for a management position, you just tell someone without a blindfold to do it and then take credit for their work.
@LolUGotBustedАй бұрын
Like a boss
@asdbanz316Ай бұрын
But what if they did it wrong to set you up. What will you do as manager?
@alihmsАй бұрын
@asdbanz316 You get another 4 persons to form a "Coin Flipping" team. Hire a consultant to oversee the them. Once they done and reported back to you, discard all their work and subcontract the job to an external party.
@FrommermanАй бұрын
Blame the subordinate, claim ignorance of the situation, hide behind HR's lawyers. Easy.
@thetimebinderАй бұрын
doesn't say you can't get help
@verkuilbАй бұрын
Instant solution: put 50 coins in each pile. The puzzle says to “divide the coins into 2 piles so both piles have the same number of heads.” Each coin has one head and one tail, so any 50 coins will have 50 heads and 50 tails. There is nothing in the problem statement which says anything about the heads being face up or face down.
@isobar5857Ай бұрын
Yeah...once again it was a word problem. Glad I got straight away.
@hj8607Ай бұрын
Give that answer in the interview and you get passed by. Give Presh's answered and you will also get passed by. No where in direction was it said you could flip over any of the coins !
@dtkedtyjrtyjАй бұрын
Take 50 coins, sort them into a pile, lay it down on the side. Do the same for the rest. It'll be a little fiddly, but it should be doable. Two piles of coins on the side, no heads in either. Or, lazy boy solution. Declare each coin is a pile. Any one pile will have at least nine other piles with the same number of heads.
@hj8607Ай бұрын
@dtkedtyjrtyj you would need to be a magician to do that with coins and there testing for intelligence not slight of hand. 🤪
@ironiesherАй бұрын
the literal MOMENT i read this, presh started talking about this
@TomeTravelerАй бұрын
Start sliding coins from the original pile, one at a time, into a second pile. At some point in the process, you'll slide a fifth head into the second pile and fulfill the conditions. Being blindfolded, you can't tell when this happens, but the task doesn't specify that you must divide the coins into the specified piles and stop, just that you get five heads in each pile.
@castirondudeАй бұрын
Spoken like a true software engineer!
@chdrsАй бұрын
Similarly, you could just grab 3 coins and put each into it's own pile. Two of them definitely have the same number of heads... You just don't know which ones.
@-Kal-Ай бұрын
Or take two coins. Each coin is a pile. If the puzzle is solved, stop. A correct solution is guaranteed before the original pile is exhausted.
@exoplanet11Ай бұрын
love that solution. You could even ask the questioner "is the test over once a solution is obtained?". If they say yes, then they are committed to stopping the test and will help you find the solution.
@3057luisАй бұрын
So you must have someone to tell you stop.
@sitnamkradАй бұрын
As programmer, I find the question somewhat misleading. When working on an algorithm to sort data into specific categories, they tend to imply "Do not alter the data". Otherwise every sorting algorithm would be O(n). "Just go over each element and alter the data so that it's sorted".
@jakeic1Ай бұрын
The point of the question is to see how you order your thinking, so at first glance it would seem that solving this riddle would be impossible or it would require luck, but if you think about all the things you can do to the coins, you will eventually get the right answer. But really, these questions just serve as a way to weed people out, they're not a requirement to be good at whatever job they're hiring you for and are often just a reflection of how often you've been exposed to these things rather than a marker for intelligence or creativity or demonstrating how good of an employee you'll be. It's like solving any kind of puzzle, you'll pick up on the sort of tricks the puzzle maker uses and they become easier over time.
@sitnamkradАй бұрын
@@jakeic1 All the more reason for me as a programmer to loathe these kind of questions. They are "gotchas" rather than actual programming questions. I watch this channel expecting the occasional trick. But this is a question presented at a tech company. I expect questions related to tech. Not puzzles that you can only solve if you think to do the one thing that would be the absolutely most pointless thing to do in a sorting algorithm.
@ironcito1101Ай бұрын
Yeah, "you can flip the coins" was kind of important and was left out.
@greatbriton8425Ай бұрын
I'm an experienced programmer too and I thought of the solution naturally - it's obvious that the coins do not represent real data.
@foogod4237Ай бұрын
Nothing in this question said anything about "working on an algorithm" (or anything to do with programming at all). If they asked a question about how to get a cat out of a tree or how to cook an omelet, would you also assume that they meant "using only software"? These sorts of questions are clearly logic or thinking puzzles, based on real-world scenarios, not programming puzzles at all. It really just sounds like you're making excuses for your limited thinking, frankly.
@steves9250Ай бұрын
As a software developer, this is a hardware problem
@ekxo1126Ай бұрын
As a soft developer, this is a hard problem
@Mindflayer86Ай бұрын
😂
@omkarsangvikar4166Ай бұрын
As a non hardware developer this is software program problem
@steves9250Ай бұрын
Start with one pile, move one coin at a time into the second pile and ask “have I done it yet?”, repeat until the answer is yes. You might not get a job at Apple, but you should get one at Microsoft.
@_MentatАй бұрын
Suboptimal! Move 5 coins to make your first pile - you can't have equal numbers until your pile has 5 coins in it. Then keep moving coins individually until you have 95 in the new pile. You will have satisfied the requirement at some point.
@simoningate2056Ай бұрын
Only if you constantly say this will take 30 seconds then 50 seconds then 2 minutes then crash then count down again - Microsoft time.
@dielaughing73Ай бұрын
This is why WHILE loops are not efficient
@ahojgАй бұрын
😂😂😂❤
@TooTallForPonyАй бұрын
I call this the "Clever Hans" approach. Clever Hans was a horse that could supposedly do math. His handler would ask him a math question like "what's 2 x 3?" and he would give the answer by scraping his hoof on the ground 6 times. But what people didn't realize is that he had learned to just keep scraping until his handler gave a subtle nod, at which point he'd get a piece of apple. So in a way, the correct answer is "keep brute-forcing the solution until your manager is happy," which is always the best advice.
@talir71Ай бұрын
Another legal loophole: The riddle doesn't say you can't remove the blindfold, so take it off and find 5 heads-up coins to move to the other side.
@davejacob5208Ай бұрын
THAT idea really impresses me. because the "you are put into situation x"-premise is part of every puzzle, it is so easy to not see it as a variable one could also influence...
@PotatoVarietyАй бұрын
You have blindfold and gloves? Sure. Lips and tongue are the most sensitive parts of the body. Dintinguishing coins is not hard.
@gergely6463Ай бұрын
The riddle doesn't say you can't remove the coins. Agressively sweep the coins off the table and yell EQUAL! 0 = 0! No coins on either pile.
@TheEulerIDАй бұрын
@@gergely64630! = 1, not 0...
@PotatoVarietyАй бұрын
@@gergely6463 I see a HR employee here
@enlongjones2394Ай бұрын
Oh, I’ve seen this question elsewhere. Set aside any 10 coins into one group, then flip over all the coins in that group. The only thing you know about the coins is that 10 out of the 100 are already heads up. If the coins you randomly take are all 10 heads up coins, then turning them over would leave you with 0 heads in this new pile, and 0 in the larger pile. If 0 coins you took were heads up, then you’ll now have 10 in the small pile, and 10 in the larger pile. Take just 1 heads coin and 9 tails coins? The large pile now has 9 heads coins, so flipping the small pile will give you the same number. This works for any random result you can get from taking 10 coins from the large pile. Any heads coin you take for the small pile takes 1 away from the large pile. Or to put it another way, every tails coin in the small pile represents a heads coin you *did not* remove from the large pile, so you end up with the perfect number regardless of the ratio.
@bobross7473Ай бұрын
Yeah, I’ve seen it from Ted Ed
@rizka7945Ай бұрын
Algebraic explanation. 1. Select 10 coins arbitrarily. Let's call it pile A. 2. The remaining 90 coins are the pile B. The pile B has X coins heads up, where X
@PivDen-jv3thАй бұрын
First, you should actively think about question, make some mistakes and take avail, after solve it with incredible solution)
@cheriem432Ай бұрын
You solution says nothing about knowing that the 10 coins are initially heads down, so flipping them all over only alter what each coin was before to its opposite. Your solution isn't. Sorry.
@enlongjones2394Ай бұрын
@ yes. It alters what each coin *in that group of 10* are. And it so happens that no matter what 10 random coins are in that pile, there will be as many tails-up coins there as heads-up coins remaining in the larger pile of 90. If you flip that group of 10, you will always end up with equal heads-up coins in both groups. If you randomly take 3 heads and 7 tails, you’ve removed 3 heads from the larger pile, leaving 7. So flipping the group of 10 makes that 3 tails and 7 heads, causing there to be equal heads in both piles. Try this logic for any random assortment of 10 coins you take from the original pile, and you’ll get a similar result.
@ishanagarwal7171Ай бұрын
My solution is like that Cut each coin in half and put one half in pile A and the other half in pile B Now both piles have 5 heads and 45 tails with 100% probability
@BigchickenburgerАй бұрын
Sigma
@parthagarwal6334Ай бұрын
Whoa!! That is actually out of the box
@TeutonJon78Ай бұрын
Technically that would leave you with 10 heads and 90 tails in each pile. Cutting the coin in half wouldn't reduce the number of head/tails. Still solves the problem though.
@BigchickenburgerАй бұрын
@@TeutonJon78 Are you a refrigerator
@notsus8537Ай бұрын
Yeah, good luck trying to cut the coins in half while blindfolded
@TheSeanbaАй бұрын
Here's my 2 part solution: 1) Politely inform the interviewer that their position is not a good fit for you. 2) Go to another company that respects software engineers enough to ask them software engineering questions.
@kozell27 күн бұрын
This is the only correct answer.
@kv956822 күн бұрын
Definitely the best answer
@rudrodeepchatterjee17 күн бұрын
Plot twist- Company 2 instructs you to create a script that visualises the same 100 coin riddle in an array. Hence, devise a program that sorts the array as requested.
@K9MegahertzАй бұрын
As someone who has done programming on and off for 35+ years in various different languages, this is a horrible interview question for software engineering. Ability to solve logic problems and the ability to write quality software are two completely different skill sets.
@hobrin4242Ай бұрын
this is not a logic puzzle
@plaidchuckАй бұрын
Well its because the market is saturated so they have to put all of these hidden gotchas to filter people out
@ticketforlife2103Ай бұрын
@@hobrin4242it is
@philrod1Ай бұрын
Aye. I assumed at first that there needed to be 5 heads in each pile. Having said that, I learned in a job interview to be sure to properly specify the problem before trying to solve it.
@cheriem432Ай бұрын
I agree wholeheartedly, and I don't program.
@anthonyrepetto3474Ай бұрын
Elegant! My gut reaction when you stated the problem: "Flip each coin in the air into alternating piles; flip a coin into pile X, then another coin into pile Y, repeat until all 100 coins have been flipped. The probability that both piles have 50 heads is high, plus the probability of both having 48, 49, 51, 52, etc. - it's simple, fast to implement, mostly right."
@hsblw_6Ай бұрын
Awesome! This is accurate, you'd do great with jobs that require this level of precision. I'd go for the practical approach: just divide the pile in half and understanding that the chances I've taken half of the coins that were already heads is enough to make it close 😂
@technoboop189025 күн бұрын
Thats a smarter answer than the one presented
@CKarmorr14 сағат бұрын
This was my solution too, they are coins, kind of natural to flip them as it's 50/50
@chriss3404Ай бұрын
I was trying to extract some more generic problem/riddle solving strategies and I came on a nice way to simplify this problem!!! Instead to 100 coins and 10 tails reduce to 10 coins and 1 tails. Then it's pretty obvious that you can just take a coin with impunity and flip it! From there, you just have to realize that that property also applies to taking a subset of coins and flipping them :D
@g.tucker8682Ай бұрын
That’s a nice insight
@LaurenWhateverАй бұрын
This doesn’t scale up. In the smaller version, one coin represents either all of the tails or none of the tails. You can’t have that guarantee with the higher resolution of 100 coins.
@oov55Ай бұрын
@@LaurenWhatever qua????
@LaurenWhateverАй бұрын
@@oov55 Oh, I misunderstood this solution. It would be a pile of 90 and a pile of 10. That works.
@SRHMusic012Ай бұрын
I like this approach, too, starting with a smaller, but representative problem. It was not obvious to me immediately that ten is the right number to move out of 100, but with the reduced problem it becomes quite clear. Cheers
@AndreaForlaniАй бұрын
Instructions unclear: I now have three piles of cards.
@ДарьяОсипова-ч1рАй бұрын
A fellow artist or copy wrighter?
@johannageisel5390Ай бұрын
Couldn't reproduce your results. I now have 33.3 6-sided dice.
@illexsquidАй бұрын
@@johannageisel5390 Yeah but if you divide them into two piles and flip them, you'll have 6 33.3-sided dice.
@johannageisel5390Ай бұрын
@@illexsquid ROFL.
@notsus8537Ай бұрын
My solution: Asking someone else to divide the coins for me, I may be blindfolded but not muted.
@benisroodАй бұрын
That's a good solution
@farhanrejwanАй бұрын
that's like asking someone else in the company to do your job 😂
@ronald3836Ай бұрын
Delegate.
@LectrikfroАй бұрын
Middle management
@yurenchuАй бұрын
@@notsus8537 The someone else will leave with all the coins in their pocket. I guess 0 coins showing "heads" in each pile satisfies the required end condition.
@lazprayoghaАй бұрын
This solution is also used in a very famous card trick which i performed to my friends couple years ago. Instantly got it once i realize the connection.
@fgvcosmic6752Ай бұрын
Yep, the same card tring came to my mind when I read the question
@cheriem432Ай бұрын
So, what's the connection?
@CraftingTableMCАй бұрын
same!
@juncheok8579Ай бұрын
Yeah, quite sure I learnt this from Vsauce or somewhere similar
@DJF1947Ай бұрын
It is also analogous to the old puzzle about mixing alcohol and water: put some of the alcohol into the water, and then put some of that mixture back into the water. Which container then has the higher alcohol content? Duh!
@Shad0wWarr10rАй бұрын
Makes 100 piles of 1 coins. Now there are atleast 2 piles with equal head count
@stergiosstergiou2817Ай бұрын
My algo prof gave me this puzzle 20 years ago (a variation thereof: 10 cards facing up on a deck of cards). To annoy him, I told him the same thing: create 52 piles, and you'll have at least two with the same number of cards facing up. The goal was achieved. ;-)
@looth017Ай бұрын
Six piles would work.
@Killer_TortoiseАй бұрын
The problem with this "solution" is that a pile, by definition, is more than one item.
@DendrocnideMoroidesАй бұрын
@@Killer_Tortoise ok then 50 piles of 2 coins would also work.
@thetimebinderАй бұрын
@Killer_Tortoise Why do you think that? A set xan contain zero elements.
@2DLexaАй бұрын
Solved it on my own! Thank you for presenting this problem, boosted my confidence a little :)
@splunge2222Ай бұрын
As a former Apple manager, this is a teamwork question... although you cannot see the coins, there is nothing saying that you can't get a team member to look at the coins and solve the problem with you.
@Epyon1201Ай бұрын
in that case there's nothing saying you cant remove your blindfold.
@mmattson8947Ай бұрын
@@Epyon1201 Or if told you can't, then get your team member to remove it for you.
@macchiato_1881Ай бұрын
As someone who hates management, this is a shitty interniew question from a technical and teamwork perspective. Do all HR employees have hollow brains?
@splunge2222Ай бұрын
@@macchiato_1881 You might not like it, but this is hiring for a corporate job - so it is trying to eliminate people who can't deal with questions with no obvious answer, people who can't question whether this is the right question to be asking, people who hate management, people who can't be diplomatic with HR, and people who can't spell "interview."
@TooTallForPonyАй бұрын
99% of the time the interviewer will learn absolutely nothing about the candidate's teamwork skills from their answer to this question. "Tell me about a situation where you had to work with a team to accomplish a goal" will yield much more information about the candidate's approach to teamwork, their memory, communication skills, general intelligence, and approach to problem-solving. There's no need to throw trick questions at people to learn about the skills that really matter in the workplace.
@fredashayАй бұрын
I would put all the coins into a bucket and shake it up, then spill it out into two piles. Might not be exactly 50/50, but it would be close.
@NshadowtailАй бұрын
This would be a good answer if you were working with ten thousand coins, but at only a hundred there's too much chance of a big swing.
@ssuchanekАй бұрын
Yes, that was also my first idea.
@michaelthornesАй бұрын
@@Nshadowtail quite the opposite, in fact. take a set of coins being flipped with a target of 50%H to 50%T (1:1) 2 coins = 50% chance that you have an even split 4 coins = 37.5% 10 coins = ~24.6% 20 coins = ~17.6% 50 coins = ~11.3% 100 coins = ~8% 100 coins = ~2.5% simply, this is because there's a much larger range of numbers it can land on, and more trials leads to more variance. ask your LLM of choice for an explanation about the statistics of coin flips
@michaelthornesАй бұрын
on the other hand, when you flip more coins, you increase the chances of getting close to 50% - the average tends towards 50%. but the chance of hitting it exactly still goes down. if you're playing a game where there's a 60% chance of gaining $1 and a 40% chance of losing $1, you should only play that game if you can afford to lose a fair bit of money, and only if you get a lot of chances. if you play 3 times, you can easily lose $3, that will happen 35.2% of the time. if you play 1000 times, you're set to earn about $200, and the chance of losing money is 0.0000000067%
@johngaltline9933Ай бұрын
That's bot how it works. If you shake your bucket 100 times the average will be close to 60/50, but any individual shake of the bucket could have any outcome. Think of a pair of standard dice in a game. There's only a 1 in 36 chance that you roll a 12, but 12's happen all the time none the less. Every single roll is not a 7, even though a 7 is more likely than any other number.
@RavenMobileАй бұрын
This is mind-boggling! I didn't think there could be a real answer to this one. Colour me impressed.
@PokemokiАй бұрын
Step 1. Take off the blindfold. Step 2. Split the piles
@SoothingMusic883Ай бұрын
smart man
@LectrikfroАй бұрын
I pocket all 100 coins and both piles contain 0 heads, now even if I don't get the job I still get paid.
@RobertHorton197513 күн бұрын
I read the challenge differently: "...both piles have the same number of heads" doesn't specify that the coins have to have the heads side facing up. So, simply divide the hundred coins into two equal piles. Whether facing up or down, each pile still has fifty heads.
@Scales_FNАй бұрын
I love these puzzles, this one seemed a little harder but it actually didn't take me as long as some of the others on this channel
@riluna369529 күн бұрын
I was struggling with this one when I finally remembered one of the go-to tactics for big-number puzzles like this: Shrink the numbers and try again. So I tried with just four coins split two each and had an easier time grasping all of the possibilities. I was astounded to discover that taking two and flipping them would work in all cases, and extrapolated to realize that it would work for any value...as long as you had the same number of heads and tails in the starting pile. I was unable to finish the main puzzle from there. But shock of shocks when you revealed the solution to be exactly what I'd already figured out. I had just failed to recognize that all the excess tails coins were effectively empty space and could be ignored. All it really did was significantly skew the chances of the ten you picked being tails instead of heads, but it still works in all cases. So close, and yet so far... As an aside, while this strategy only succeeds while the number of tails is equal to or greater than the number of heads, in any situation where you have more heads, you can just flip every single coin over before anything else so that you now have more tails, and then solve using the same strategy from there.
@YoubeentaggedАй бұрын
Saw this on ted-ed a while back. Good to know I still remember the solution.
@verkuilbАй бұрын
If your gloves are thick enough that you can’t detect the difference between a head and a tail by feel, then there’s also a strong chance that those gloves make it nearly impossible to pick up a coin off a table and turn it over. Thus negating the first solution Presh gives.
@EaglePickingАй бұрын
A table has an edge, which can be used to flip the coins easily while using the thick gloves.
@brianzmek7272Ай бұрын
@@EaglePickingthey don't have to be thick even surgical gloves will dull touch enough especially if just a little to big but will not cripple dexterity.
@lorikeetrainwingАй бұрын
@@brianzmek7272 Counterpoint: fingernails will let you roughly determine the design even in latex gloves
@photoo848Ай бұрын
Put your finger on a coin, slide them to the edge of the table, pinch between fingers when passing over the edge and flip
@BEN-ys6guАй бұрын
@@brianzmek7272counterpoint 2: you can pick up a coin and "scratch" the surface of another coin and try to feel what kind of coin is it by how the coin moves
@UncleKennysPlaceАй бұрын
I stopped at 1:01. Divide the coins into two piles of fifty. Each of the 100 coins has a head, so ... done.
@NabeelFarooquiАй бұрын
Sure you did
@farhanrejwanАй бұрын
9:59 - congrats, you're hired in the apple's legal team.
@cheriem432Ай бұрын
Thank you. I was beginning to think I was alone in my impeccable logic.
@charliehorse868622 күн бұрын
I stopped at 1:05, so you win. I always look for loopholes in the wording of the question, especially when the answer is otherwise impossible.
@DrDailboАй бұрын
Sometimes when I see your thumbnails pop up I'll put my phone down and think about it. This time I'm glad to say I worked it out in my head pretty quickly! Thanks for all you do 🙏
@richardfarrer5616Ай бұрын
1. Every coin has a head and a tail. You didn't specify face up. So two piles of fifty coins satisfy the conditions. 2. I pocket all the coins and designate two piles of zero coins. Even if the interviewer disagrees, I end up with a hundred coins. 3. Take fifty coins and turn them all over. Irrespective of the number of heads or tails originally, the numbers will be the same.
@g.tucker8682Ай бұрын
Your solutions 1. and 2. might be rated highly for originality. Unfortunately, 3. costs you the job as it is wrong no matter how you split the groups. A counterexample shows the fallacy: suppose your group of fifty is all tails - after the flipping you have 10 heads in the original pile and 50 in the new pile. There is no distribution of 50 and 50 that would work. You could retreat to your solution 1., but the interviewer might counter that you have then wasted time counting and flipping 50 coins.
@SanjayRay-dp4vsАй бұрын
Thanks!
@Solrex_the_Sun_KingАй бұрын
0:42 here's my answer: divide the coins into two equal piles, pile 1 and pile 2. Flip all the coins in one of the piles, say pile 1. Boom. That should make a pile with mostly heads and mostly tails. Then divide each pile into 2 more piles. You should have pile 11, 12, 21, and 22, where piles with a 1 in the tens digit started in the first pile in the first split off, and those with a 2 are the other first pile. Then the ones digit is the second split. Swap pile 12 and 21, then combine 11 with 21 and 12 with 22. The number of coins should be equal. Sorry if I explained it poorly.
@not2tiredАй бұрын
This is a great puzzle, indeed with many clever solutions that can say a lot about the solver. I appreciate that you took the time to unpack more than one of them. I enjoy puzzles like this one, and am also a coin enthusiast... so here's a fun fact: If you perform the flip depicted at 0:21, the tails image would be upside down. American coins need to be flipped about a horizontal axis (commonly known as a vertical flip) to go from upright heads to upright tails.
@jagmarzАй бұрын
1:57. Oh, duh. Move/flip 10 coins to the new pile. This will leave the same number of heads in each final pile. If you happen to pick the 10 heads coins, both piles will have 0 heads. If you don't pick any heads coins, then in the end both piles will have 10.
@AisaaaxАй бұрын
I got to the same conclusion exactly the same time as you (1:56 but I paused) 😅
@ItayTheItay9 күн бұрын
proud of myself for finding the solution for this one on my own :) Great video as always, love your riddles and puzzles!
@Sam_on_YouTubeАй бұрын
It took me a minute or two, but I did solve it in my head. Solved it from the thumbnail and then watched the video to confirm.
@artex98Ай бұрын
Tim Cook, is that you?
@rogerkearns8094Ай бұрын
I've not seen this problem before. The solution seems like magic! Your best ever video, thank you.
@Vex-MTGАй бұрын
I'm a bit disappointed, Presh, that you didn't show that this solution also works for any other number of starting Heads. It's intuitive that it works for x50 too
@Killer_TortoiseАй бұрын
Didn't watch the video, but straight away I had the solution: Pick 10 coins at random from the 100 coins pile, flip them and make them the second pile. Now, let's denote X to be the number of coins that showed heads in the original pile that we picked and flipped when we moved them to the second pile. Therefore, each pile now has 10 - X coins showing heads.
@Solrex_the_Sun_KingАй бұрын
9:59 here's a joke answer that gets you thrown out the window like in the meme, note he said working for Apple. So we have 100 coins, 90 coins that work, 10 that don't. If I wanted to get hired, I would just sell them 100 new coins. If I wanted to be blacklisted, I could suggest repairing the all the coins for a price less than buying all of them over again. We could even just let our customers repair their own coins and make it as easy as possible for them to repair their own coins rather than force us to fix it by selling them a brand new coin.
@gcewingАй бұрын
They can repair their coin, but then they have to take it to an authorised Apple mint to get the software reset.
@Allenar4Ай бұрын
I actually would have said this solution in an interview based completely on the logic blind guessing 10 tails is not horrible odds. I did not come to the realization that it always worked, i just knew it was more likely than anything else i could think up 😂
@rickdesperАй бұрын
I solved this by realizing that coin flipping had to play a role. And if I wanted an algorithm that always worked, i couldn't allow for a probability of failure. So, I want a second pile, with, say, m coins. And then I flip n of them. But it's clear that if 0 < n < m, this approach will allow randomness. So, I have to flip all of them. Now, let's say there are k heads initially in the second pile. That leaves 10-k heads in the first pile. And after i flip the m coins, I'll have (m-k) heads in the second pile. So if I want m-k = 10-k, I select m=10.
@JLvatronАй бұрын
I solved this in my head, but I believe the reason is that you have posted a similar video in the past few years and I remembered the trick.
@cheriem432Ай бұрын
Uh, what's the trick?
@JLvatronАй бұрын
@@cheriem432 It's in the video. Presh explains the actions.
@mohitrawat5225Ай бұрын
@@JLvatronI don't remember seeing this type of question on this channel and I have visited all the videos. But I saw this question on Bright Side with 52 cards and 13 facing up in which the youtuber specifically narrated that the front side must face up.
@JLvatronАй бұрын
@@mohitrawat5225 I recall seeing it in a logic puzzle KZbin video. I mostly watch Presh's videos, but it's always possible it was another. And I think you're right it was about cards.
@jacksonreynolds7433Ай бұрын
This was a Ted Ed riddle too
@jiaswan22Ай бұрын
Can I stand all of the coins on their sides/rims? Zero heads in either bucket then.
@jiaswan22Ай бұрын
Ah, he got there 🤣
@fabianstollАй бұрын
I divided the coins evenly and flipped them. The final score was 25 to 23. This is my approach: I work quickly and achieve quite good results.
@benisroodАй бұрын
People at Apple are not solving "impossible problems". Maybe a tiny percentage of engineers are working on very difficult problems, the vast majority will just be very capable and professional developers. This idea that they are like scientists and researchers is a ridiculous joke.
@DreadX10Ай бұрын
Yep, they are just like painters; the vast majority is limited to doing walls and ceilings and the very rare one paints a ceiling like the Sistine Chappel.
@EiQ200Ай бұрын
I like this clean solution with no dirty tricks.
@ashley487323Ай бұрын
Flip the table. Present 2 piles of size 0. (Or... Balence all 100 coins on their side). 2 groups with 0 heads up coins.
@roccov3614Ай бұрын
I can't believe I figured this out. Only took a few minutes of thinking, and yes, I did it in my head.
@balazslakatos9817Ай бұрын
something wrong with the graphics at 5:50, the coins supposed to turn back to the original position.
@colley0018 күн бұрын
You are spot on! From that point the video is graphically the wrong way round
@KodukoLoLАй бұрын
I came to solution by myself. I am proud as a long viewer of your channel
@ayo-whats-thisАй бұрын
My reasoning was this. Take 10 coins and flip them and put them in the 2nd pile. That way you have 90 coins in first pile and 10 on the other. With equal number of heads. I will check the video to see if I'm correct later when my network gets better
@zuqini16 сағат бұрын
It’s easy to understand the answer after it’s revealed, but it’s really hard to find the key insights to solve new problems. Do you have any tips for developing the intuition for finding these insights, or how to think outside of the box? I continue to struggle with this even after studying many of these questions and go blank with new questions.
@patrickwright855239 минут бұрын
I had the same question after getting through the answer summary, and came to the "lawyer conclusion" stated in the video. The trick is there are rules, set up to limit your thinking, and you have to look for the "loopholes" in the rules. Consider what the actual limits on the problem are, and see if there are things you could do to the coins that are not prohibited (or whatever things you're dealing with). Maybe easier for me to reason: What crazy things can I do that aren't prohibited, and see if it helps, or work backwards to a more reasonable solution. No idea if this is good advice, just spitballing.
@oscargr_Ай бұрын
Put a blindfold on everyone else too, then state with confidence that both piles have the same number of heads.
@briceandrieuxАй бұрын
1:08 "you are not expected to solve the puzzle instantly in your head" Welllll I already found a solution (at least I think so) when you said that sooo what should I do then x)
@Brain81505Ай бұрын
My solution: Use my elbow to feel the coins, who said that I need to use my finger to do it. Edit: I guess you can also lick them but that's kinda gross
@ronald3836Ай бұрын
Just lick them.
@cheriem432Ай бұрын
@@ronald3836 Huh?
@ronald3836Ай бұрын
@@cheriem432 to feel if it is heads or tails. Easier than elbow.
@trent800Ай бұрын
@@cheriem432your tongue is better at feeling the texture of stuff than your elbow is.
@notsus8537Ай бұрын
I don't this is a good method, there's probably better method out there than using your elbow or your tongue
@AriGatoVTАй бұрын
This one had me thinking a little, but thankfully I could solve it quickly, since I knew the problem wouldnt be so straight forward, I tried thinking outside the box and quickly realize that I could flip 10 coins and get it right 100% of the time
@1smallstepАй бұрын
Stand all the coins on end. There are now no heads up, no tails up. Divide them into two rolls of fifty, still keeping them on edge. Easy peasy. Okay, now to watch the video.
@Benjamin1986980Ай бұрын
Your solution is just as good and has the benefit of now having them in nice rolls that can be spent, as well as blatantly rejecting the absurdity.
@marrozzone5 күн бұрын
Nice, I would have gone for the 2nd way, just dividing in 2 piles, every coin has 1 heads face, so 50/50, but the 1st method is brilliant!
@StillCodeАй бұрын
Better solution: split the piles into 50 coins each, each pile in a box and never look inside the box as each coin is both heads and tails until you look inside 😁
@trueriver1950Ай бұрын
Don't you need a cat 😺 in the box 🎁 for this to work?
@boogaturk83636 күн бұрын
I would pick up a coin and use the edge as a sensory device to run across the faces of the other coins. I could sense the dips and determine if it's one kind of dip or another, separating them that way. Once I checked the last coin, I'd have to use it as a sensor to detect what I had used as the original sensor coin. I grew up without nightlights, so had to learn how to recognize things in the dark with just my hands.
@nedmerrill5705Ай бұрын
I would argue that, by definition, EVERY coin has a HEAD and a TAIL. Count out 50 coins.
@君子ロベルトАй бұрын
It took me one or two minutes in my head to come up with the solution before starting the movie. Seems like I have seen enough riddles on your channel...
@pumaconcolor2855Ай бұрын
Take 10 random coins and flip them? The riddle doesn't say nothing against it, I think it should work.
@paulkennedy8701Ай бұрын
I figured flipping had to be part of it. I just needed to workout how many.
@soulfullofcherriesАй бұрын
This is the solution I thought of. This solution is better than the original if you ask me
@paulkennedy8701Ай бұрын
@@soulfullofcherries That's the answer Presh gives. At 9:00. Are you saying there's another, "original" answer?
@soulfullofcherriesАй бұрын
@paulkennedy8701 lol I didn't watch the full video my bad
@paulkennedy8701Ай бұрын
@@soulfullofcherries Yeah, he did take a long time to get to it. I was sure of the answer. I had to keep jumping ahead through his calculation of probabilities and other irrelevancies.
@pandabearguy14 күн бұрын
I was asked this question by a friend a few months ago. I was kinda stumped, and after a few minutes he gave a hint "Invariance". Then I got it in under a minute.
@elSethroАй бұрын
Have not finished watching the video yet. I believe that if you divide into a pile of 10, and a pile of 90, and then flip all the coins in the 10 pile, then that would work. If all 10 happen to be heads, then they get flipped over and there are 0 heads in each pile. If 9 are heads, then the other pile must be 1 head and 89 tails. Flipping the pile of 10 turns the 9 heads into 9 tails, and the 1 tail in to 1 head, matching the larger pile. And so on - should work for any combination of heads and tails in the pile of 10.
@BarghaestАй бұрын
That was my solution as well. Simple probability. No matter how many heads I get in the pile I will have tails equal to the amount of heads in the other pile and flipping them makes them match.
@samlee5549Ай бұрын
Got it by 2:43! The rules never state we can’t flip coins (in fact, the setup seems to sneakily suggest that it is expected). As opposed to splitting one pile into two separate piles, you want to take one pile, and by removing coins from it, create a second pile. (Important mental distinction). The number of tails in either pile is irrelevant. Thus, to get two piles with an equal number of heads, all you have to do is take 10 coins from the 1st pile, flip them, and then put them in the second pile: If you took a tails, it results in a heads in the second pile: the number of heads in each pile are now 1 closer to each other If you took a heads, it results in a tails added to the 2nd pile, and also results in a head removed from the first pile. As such, the number of heads in each pile is now 1 closer to each other. As the first pile starts with ten heads and the second pile starts with 0, you need 10 such moves to make the number of heads end up equal. (For an example, imagine all the coins transferred were tails. 10 tails would be flipped and added to the 2nd pile, resulting in an equal 10 heads in both piles. If all the coins transferred were heads, 10 heads would be removed from the first pile, and no heads added to the 2nd pile, resulting in an equal 0 number of heads in both piles.)
@TheBoogerJamesАй бұрын
Flip the table over. 2 piles with 0 coins in each. Done. Then curse out the interviewer for asking ridiculous questions.
@DrakiniteOfficial19 күн бұрын
Before clicking on the video, I thought of an answer from reading the thumbnail. My solution was to flip each coin and split the piles in two. Statistically, I'm likely to come *close* to equal # of heads as tails.
@suryanshsrivastava5551Ай бұрын
Or if you're not a math nerd, just toss each coin and seperate them into two piles once they land.
@bobross7473Ай бұрын
You’re blindfolded lmao
@suryanshsrivastava5551Ай бұрын
@@bobross7473 Yes and you can still toss them in the air and catch it in your hands.
@talkingscribe8898Ай бұрын
@@suryanshsrivastava5551 but you have gloves on and can't feel the coin
@theJadeАй бұрын
I think the point is for large number of throws, heads will appear 50% of the time. Not exact but close...
@girltalk08Ай бұрын
If you can’t flip the coins, my solution was N/X where N is the total coins and X is the number of heads. Then randomly sort the X groups into the number groups you want it divided into. So break the quarters into 10 groups of 10 then randomly choose groups to go into the 2 big groups.
@dreamboat7Ай бұрын
Grab 10 and flip them. Had come across this during campus placement.
@benisroodАй бұрын
Campus?
@junj10233 күн бұрын
Awesome! Loved it!
@AmixLiarkАй бұрын
I'd like to point out that dipiction is a group of coins and not a pile of coins. The term "pile" implies stacked on top of one another. A pile of 100 coins stacked perfectly would be very tall and prone to falling over, ruining the distribution.
@GrammulkaАй бұрын
If they're stacked on top of one another, doesn't that make it a stack, not a pile?
@AmixLiarkАй бұрын
@Grammulka i'd say a stack is a pile but a pile isn't always a stack. A stack is an organized pile. A pile is a 3 dimensional grouping of objects. A grouping is any number of any objects in close proximity.
@Johnlee-ix1kuАй бұрын
"Hi Sir, I'm just applying for the role of the janitor"
@b_z5571Ай бұрын
Stopped at 0:57 take 10 coins and flip them over no matter how many of the coins you take with heads you’ll have the same number once you flip the pile of 10. Take none 10 heads in both take them all 0 heads in both. Take any other number away from them with heads and flip them they become tails meaning the amount you flip matches the heads. There’s a similar Ted Ed riddle.
@ThWind81Ай бұрын
What if the 10 coins you pulled consisted of 6 heads and 4 tails? Flipping them just gives you 6 tails and 4 heads.
@b_z5571Ай бұрын
@ I’ve taken 6 heads from the other group meaning there’s only 4 left. It’s the same then.
@ThWind81Ай бұрын
I see what you mean now. Your explanation was unclear.
@freetheghostАй бұрын
Just skip to 10:37, because your mission is just to have 2 piles with the same number of heads (not same number of heads side up).
@AmsZeroАй бұрын
9:35 You mean problems solved a decade before!
@SeegteaseАй бұрын
I couldn't think of any solution until you said we could flip them, then it was pretty easy to see.
@guy_th18Ай бұрын
0:36 AI garbage? Why?
@zacharykosove9048Ай бұрын
The first two solutions that come to mind. 1. Place them in rolls lying sideways to ensure no heads are facing up, guaranteeing an equal count. 2. OR Cut each coin in half, placing halves in separate piles to achieve equal distribution. The actual solution is something that seems so obvious in hindsight, I thought it was a word problem
@xorbe2Ай бұрын
As an interviewer, these sorts of questions are terrible for gauging the skills I'm looking for, imho. I have a co-worker that asks a physics puzzle ... I don't agree.
@sphygoАй бұрын
My answer would be to split the piles into 50 and 50, then flip all the coins (not to the other side, flip to randomize) and that should get you statistically close to an even amount, but you are still relying on chance to actually get a match. More often that not you would end up 1 or 2 off. Once I watched more and you clarified that you can't feel the faces though, then I went to putting all the coins on their edges. Flipping exactly 10 is a very clean answer though. I didn't think there would be a way to get 100% accuracy
@lilyvaldisАй бұрын
Thankfully, TED talks already did this so I knew the solution instantly 😅
@tonyhamlin9760Ай бұрын
Great solution. I would try thinking outside the box literally. The coins are lined up in a box. The coins are in a pile in the box. Remove all the coins from the box. Two piles in the box with no coins.
@jeremiahcat8701Ай бұрын
Question: Shouldnt this work for any square number of binomial selections, with the number of "coins" selected from the pile to be the square root? I probably could've worded this better.
@erichkitzmuellerАй бұрын
Obviously, the same solution would work for any number of coins and any number of heads-up coins. 10 being the square root of 100 is just coincidence.
@TheWhite2086Ай бұрын
You're overthinking it. The general solution is to move and flip as many coins as there are heads. It doesn't matter how many coins there are or how many heads are in the group by doing this you always get a solution where it doesn't matter how many heads you moved over. eg if there were 7 heads and you moved 7 coins, if 5 of them were heads there are now 2 heads left in the first pile and the second pile has 5 heads and 2 tails so flipping them gives you 2 heads and 5 tails
@sergche371811 күн бұрын
Wow so many good answers in the comments as well. In a mathematical/physical approach I'd say there is no obvious reasons why two piles cannot be the same pile. Or look like it. I.e. for a real world task sometimes maybe you will use the same pile twice.
@luisoncpp9 күн бұрын
Solve it at first try, but it took me a while: Just by picking the coins for any strategy that you choose that achieves the goal there is a different initial configuration that would make it fail. So, without flipping is impossible. If you divide in 2 piles and flip some coins from one pile but not all of them and succeed, then there would be a different initial arrangement that would make that same moves to fail, so, no flipping individual coins. If you flip all the coins from both piles you would end up in the same situation. Last case id flipping the coins from a single pile. Suppose that one pile has a tails and b face, then the other would have 90-a tails and 10-b face. If we flip all the coins from the second pile then it will have 100-(a+b)-90+a tails and 100-(a+b)-10+b= 90-a face In that case we want 90-a = b, we can only choose the value of a+b (the amount of coins in one pile), not the value of a nor b. Fortunately 90-a=b if and only if a+b=90, that means just put 90 in one pile and flip the other.
@Kaizen.Destroyer.of.WorldsАй бұрын
Paused at 1:24 I would just take ten coins from the pile and flip them over and move them to the other pile If I grabbed 10 tails, now I have two piles with 10 heads If I grabbed 9 tails and 1 head, now I have two piles with 9 heads each Regardless of how many heads/tails I grabbed, they would always balance out
@Kaizen.Destroyer.of.WorldsАй бұрын
Now I will finish the video
@Kaizen.Destroyer.of.WorldsАй бұрын
Was this really a challenge question?
@Kaizen.Destroyer.of.WorldsАй бұрын
Oh the video isn't done - ooooohhhh
@Kaizen.Destroyer.of.WorldsАй бұрын
Hahahhah I love the other solutions
@FroggyPrinceАй бұрын
I don't know how but I solved this one very quickly lol, maybe I've heard or seen something similar to this and my brain connected the solutions.
@bobross7473Ай бұрын
You’ve probably seen it from Ted Ed
@3d_mihaiАй бұрын
For those who are not familiar with the line from Mission Impossible: 'Your mission, should you choose to accept it...' Good job here
@mata2723Ай бұрын
whoah.....what a question and solution....
@TymexComputingАй бұрын
Very nice mind walk - thank you :)
@MattiaBulgarelliАй бұрын
Is there a way to generalize the first solution for any number X of coins total and any number Y
@HimitsuYamiАй бұрын
3:20 I don't know much about this whole "choose 5 of 10 heads" / "choose 5 of 100 coins" thing. So what I did based on my understanding of how probability works was I did (10/100) * (9/99) * (8/98) * (7/97) * (6/96) and it got me the same answer so I can only guess I did it right
@logiclrdАй бұрын
The "choose" operator is effectively just shorthand for exactly what you did. It's useful shorthand but it isn't magic. :-)
@mikequinn8780Ай бұрын
Get a pair of sheers, cut every coin in half, put the left half in pile A put the right half in pile B. QED.
@michaelcooper9819Ай бұрын
Before getting too far into the video, I'd flip every odd coin and move to one pile, leave unflipped every even before moving to another, and if I know the orientation which the ten coins are that is horizontal or vertical, I would pick from the other orientation. This would result in 45 flipped tails, 45 unflipped tails, 5 flipped heads, 5 unflipped heads, for a total of 50 heads and 50 tails.
@highelectricaltemperatureАй бұрын
This is one of the kinds of problems where the fact given in the question that an answer exists is a major hint in itself.
@jaimeduncan6167Ай бұрын
the engineering solution is the one that I saw, I am sure I would never think of the melting one. I found the one with the coins in their side clever.