possible solution
@matrix A merge sort would require more than a single swap, so no.
@inditoot
There is no math or probabilities needed. Any solution works 100% of the time.
@MutoShack@functional.cafe
Some people asked me to share a lvery difficult yet simple logic puzzle that has stumped my friends. It is also my favorite interview question.
First off some background. The problem is not a trick question, as much as it may seem like one. There is no play on words, no hidden exception. Everything in this problem is exactly how it is presented and the answer doesn't rely on any slight of hand. Take this puzzle at face value.
Also **ALL ANSWERS NEED CONTENT WARNINGS** I do not want you spoiling it for others. This goes for questions and hints too.
Now on to the puzzle:
There is a room with 100 jars with lids on them all in a row. There is also a stack of papers, 100 papers each labeled 1 to 100. The papers are shuffled and one paper placed into each pot randomly.
You and your assistant are in an a joining room. Your assistant is allowed to enter the room, look in all 100 pots, and if they wish they can pick any 2 pots and switch the paper in them. They can only do this one time, they do not have to do this they can choose to also do nothing. At this point they leave the room, without talking to you.
Next, someone tells you a random number from 1 to 100. Your goal is to enter the room and open a pot tht has that number in it. You are allowed to open, at most, 50 of the pots.
Whatever process you use to open those pots must **guarantee** that by the time you open the 50th pot that the number you were given will be found. Obviously your assistant didn't know what the number is at any point.
What rules do you give your assistant, and what rules do you follow, to ensure you are successful?
@MutoShack@functional.cafe @inditoot #puzzle #riddle #riddles #puzzles #math #mathematics #maths
You are most welcome to use our next cloud. We do ask you have some STEM interest or at least an active account on https://qoto.org but it is only a request, not something we enforce. Mainly because we are building services as part of a community to enable collaboration in STEM,
Regardless your welcome to an account on our instance.
@adammish@fosstodon.org @davidblinux@fosstodon.org
@inditoot Sure I'll post it in a new post and link you.
I gave my buddy Jor a logic puzzle problem. Same one I give new programmers on interviews. Despite the answer being simple, the problem itself is hard for everyone I ever gave it to. In fact no one has ever been able to solve it within an hour and only one person has ever been able to solve it at all that I personally knew.
Anyway Jor got so frustrated he angrily went to the corner as he worked out the problem.
@Gargron ::does a little dance and juggles::
Here is my #FF ( #FollowFriday ) list. We have a lot of new faces on #QOTO I just have to share, and a new few friends from around the fediverse. Plus some old friends too.
@mngrif - hacker, gamer, bit of retro computer, ham radio, all around interesting guy and an old friend.
@Rovine - New member, mostly posts about learning experiences. Friendly and sweet.
@angelobottone - A philosophy teacher
@snder - Fair minded admin that runs several instances around the fediverse
@koyu@koyu.space - A lovely down to earth person with some tech interest, also a fellow instance admin.
@Curator - Shares wonderful art from the art instance
@rvlobato - Linux enthusiast and physicist.
@pschwede - Fellow coder
@comphys - Professional in Physics and Computing, excellent technical posts.
@TheGnuMaster - Fellow Open-source enthusiast, usually engages in discourse respectfully, good conversations.
@adrianomaini - Posts absolutely amazing vintage photos
LOL Babylon Bee is starting to get funny.
https://babylonbee.com/news/facebook-now-allows-users-flag-anything-disagree-literally-hitler
@snder shame :(
@snder It takes up more resources, but I love the feature personally.
@koyu@koyu.space
Thank you <3 I am humbled :)
I've enjoyed following you as well, it has been a pleasure.
@bandie @Deiru@gensokyo.social @Vamp898@social.tchncs.de @absturztaube @AngelooASDF@niu.moe @theemacsshibe@ponies.im @transcaffeine @marlon @cute@deadinsi.de @readytherhinos @sophia@glitterkitten.co.uk @Fyrfaras @snder @Dee @goblin@godforsaken.website
Jeffrey Phillips Freeman
Innovator & Entrepreneur in Machine Learning, Evolutionary Computing & Big Data. Avid SCUBA diver, Open-source developer, HAM radio operator, astrophotographer, and anything nerdy.
Born and raised in Philadelphia, PA, USA, currently living in Utrecht, Netherlands, USA, and Thailand. Was also living in Israel, but left.
Pronouns: Sir / Mister
(Above pronouns are not intended to mock, i will respect any persons pronouns and only wish pronouns to show respect be used with me as well. These are called neopronouns, see an example of the word "frog" used as a neopronoun here: http://tinyurl.com/44hhej89 )
A proud member of the Penobscot Native American tribe, as well as a Mayflower passenger descendant. I sometimes post about my genealogical history.
My stance on various issues:
Education: Free to PhD, tax paid
Abortion: Protected, tax paid, limited time-frame
Welfare: Yes, no one should starve
UBI: No, use welfare
Racism: is real
Guns: Shall not be infringed
LGBT+/minorities: Support
Pronouns: Will respect
Trump: Moron, evil
Biden: Senile, racist
Police: ACAB
Drugs: Fully legal, no prescriptions needed
GPG/PGP Fingerprint: 8B23 64CD 2403 6DCB 7531 01D0 052D DA8E 0506 CBCE