oxymoronic2012
BAN USER
- 1of 1 vote
AnswersYou have a matrix that is sorted as such: For each value, every index to its right and below it must be larger than the current space's value. Likewise, all entries to its left and above it must be smaller than the current value. How would you go about searching this matrix for a specific number, given its sorted nature?
- oxymoronic2012 in United States for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Intern Matrix - 2of 2 votes
AnswersJust a disclaimer: I doubt you will ever get this interview question. My interviewer even started off by saying, "Hmm, well this isn't really fair, but..." So don't place too much stock in whether or not you can solve this.
- oxymoronic2012 in United States for Bing
Question: You have a group of pigs and buckets of food for said pigs. There are 1,000 buckets of food, and exactly 1 of them is poisoned. Your goal is to determine, by the end of 1 hour, which bucket is poisoned.
The poison takes 30 minutes to kill a pig, and you'd like to kill as few pigs as possible. The number of pigs you can test is limitless, and you can assign a number to each bucket and each pig so that you know exactly which pig ate from which bucket(s). You determine which buckets to feed to which pigs, but you have no timer and no way to guesstimate the time. What is the minimum number of pigs you need to use to solve the problem?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Intern Brain Teasers
RepWant to know how to protect from black magic? Guru Ji is the world’s famous astrologer and he has ...
RepHire high professional child development center in Charlotte. Pal-A-Roo’s Child Development Center is a family-owned child care facility offering ...
RepLooking for the best child development center in Charlotte? Pal A Roos provide summer camp for children Charlotte. Our experienced ...
RepBlack magic removal mantra is the best remedy for you. Magic master provides 100% guaranteed solution.This power gives you ...
RepJonathan Galgano, Data Engineer at Blue Jeans
Drive with the most affordable Exotic Car Rental South Beach. Prestige luxury Rentals is offering you with the finest car ...
RepStevenBLuis, Data Scientist at Achieve Internet
Choose the best quality vaping accessories at Ny Vape Shop. With different types of quality vaporizers, we are one of ...
RepJohn Colcomb, Analyst at A9
With more than 20 years of car rental and dealership experience, responsible for developing growth strategies to maximize operational effectiveness ...
RepSherryellis555, Computer Scientist at ASAPInfosystemsPvtLtd
My name is Sherri Ellie Once had a fantasy of testing the market for tar in Georgia, GE. Rehearsed in ...
Repfesfporyi212, Member Technical Staff
My self Fesfpory. I work in agriculture university in India as a professor. I done PHD in Botany in Punjab ...
RepAlisonjaeger755, Data Engineer at Accolite software
I am work in Telecom line in IDEA company. I am data operator and Engineer in back end in Idea ...
RepCrystalday777, Computer Scientist at AMD
My name is Crystal Day; I'm from Sydney, Australia, Get Ex Lost Love Back and I'm a sophomore ...
Yes, the binary representation was the answer I arrived at in the interview. However, the interviewer was looking for the answer 9. He extends the binary-based answer to an n-dimensional matrix, by which you need 9 vectors of intersection to identify buckets by a unique combination of numbered pigs. At least that was how he was visualizing the problem.
- oxymoronic2012 November 03, 2016He told me the time element was not relevant, but I think the answer 9 only works if you implement the test twice in your 1 hour time period. You can either identify the poisoned bucket or rule out 512 buckets by checking roughly half of the buckets each round.