Every man in a settlement of 100 married span has cheated on his wife … Every married woman in the village instantly knows when a human being other than her husband has cuckold , but does not know when her own husband has . The village has a constabulary that does not allow for criminal conversation . Any wife who can bear witness that her hubby is unfaithful must bolt down him that very day . The women of the village would never disobey this law . One twenty-four hour period , the female monarch of the village visit and announces that at least one husband has been traitorous . What happens ?
Answer , from proofreader Olivier Coudert : The cheating married man problem is a classic recursion pb . Once all the wives know there are at least 1 cheating hubby , we can understand the process recursively . lease ’s assume that there is only 1 wander husband . Then his married woman does n’t see anybody cheating , so she know he cheats , and she will drink down him that very day . If there are 2 cheat husband , their wives know of one cheating married man , and must await one solar day before reason that their own husbands cheat ( since no hubby got killed the day of the announcement ) . So with 100 cheating husbands , all life is secure until 99 day later , when the 100 married woman wives kill their unfaithful husband all on the same twenty-four hour period . Job : Product Manager . exposure : symmetry_mind
If the probability of observing a car in 30 minutes on a highway is 0.95 , what is the chance of observing a car in 10 arcminute ( assuming constant nonremittal probability ) ?
Reader ru offers this solvent : The caper here is that .95 is the probability for 1 or more cars , not the probability of seeing just one machine . The prob . of NO cars in 30 minutes is 0.05 , so the prob of no cars in 10 minutes is the cube root of that , so the prob of seeing a automobile in 10 minutes is one minus * that * , or ~63 % Job : Product Manager
Four hoi polloi call for to cross a rickety rope bridge to get back to their camp at night … unluckily , they only have one flashlight and it only has enough light pass on for seventeen minute . The bridge is too dangerous to cross without a flashlight , and it ’s only strong enough to back two citizenry at any give time . Each of the campers walks at a different speed . One can foil the bridge in 1 moment , another in 2 minutes , the third in 5 minutes , and the tiresome poke exact 10 bit to cross . How do the camper make it across in 17 minutes ?
Answer , from an anonymous reader : 1 and 2 across ( 2 minutes ) ; 1 run back ( 3 minutes ) ; 5 and 10 go across ( 13 second ) ; 2 goes back ( 15 hour ) ; 1 and 2 crossing ( 17 min ) – and everyone safe and sound . Job : Product Manager . Photo : Jule_Berlin
You are at a party with a booster and 10 people are present include you and the acquaintance … Your friend make you a bet that for every person you discover that has the same natal day as you , you get $ 1 ; for every mortal he finds that does not have the same birthday as you , he make $ 2 . would you accept the wager ?
Answer : Ignoring seasonal upticks in birth , there ’s about 1/365 chance that any other soul has the same birthday as you and 364/365 take chances that any other random person does not . Do not take this bet . Job : Product Manager
If you look at a clock and the time is 3:15 , what is the slant between the hour and the min hands ? ( The answer to this is not zero ! )
Answer , from reader Matt Beauchamp : 7.5 degrees . Every second on the clock represents 6 degree ( 360 degrees/60 minute ) . Every time of day , the hour hand moves from one number to the next ( in this example , it is moving from 3 to 4 ) which represents 30 degrees . Since it is exactly 1/4 past the 60 minutes , the hour hand is 1/4 of the way into its 30 - academic degree head trip or 1/4 or 30 degrees….which is 7.5 academic degree . Job : Product Manager
What is the chance of breaking a control stick into 3 pieces and constitute a trigon ? Since this interrogation does n’t say the sticks must intersect at their tips to form the triangle , the solvent has to be 100 % . Any three joystick of any size of it can make a trigon . Job : Product Manager . Photo : markhillary
There ’s a latent period problem in South Africa . Diagnose it . This is plainly an extremely shadowy interrogation , and there is n’t really one correct solution . A good resolution is one in which the interviewee present acquaintance with the terminus “ latency ” and enough imagination to come up with an interesting problem with an interesting solution . Job : Product Manager Photo : warrenski
How many lines can be drawn in a 2D plane such that they are equidistant from 3 non - collinear points ?
Answer , from reader Denis : Three . Take any two of the spot . Draw a line that is parallel to the line segment made by those two level and halfway between that argument section and the third stop . Repeat for every combination of two points . Job : Software Engineer . Photo : Caveman 92223
What ’s 2 to the power of 64 ?
1.84467441 × 1019 This is a passably easy solution to figure out when you ’re not sitting in an audience with no calculator around . Job : Software Engineer .
Imagine you have a closet full of shirt . It ’s very hard to find a shirt . So what can you do to machinate your shirts for comfortable retrieval ? There ’s no one result to this . The interviewer want to test the interviewee ’s vision and creativity with problem solving . We experience like lector “ Dude ” might impress a Google interview with this resolution : orchestrate them accord to eccentric of apparel like a hasheesh and then organize each eccentric into a 2 - 3 - 4 - Tree or RedBlack Tree . Job : Software Engineer . Photo : Brymo
You are given a game of Tic Tac Toe … You have to write a function in which you pass the whole secret plan and name of a player . The function will regress whether the histrion has won the plot or not . First you to decide which data structure you will use for the biz . You want to tell the algorithm first and then need to drop a line the code . banknote : Some position may be clean in the game । So your data structure should consider this condition also .
How long it would take to sort 1 trillion number ? get along up with a good estimation . Here ’s another query without one answer . The idea is to test the interviewee ’s creativity .
We like the simple answer two readers come up with : Merge Sort for sorting . O(1,000,000,000,000 Log 1,000,000,000,000 ) – Average Case Scenario ; O(1,000,000,000,000 Log 1,000,000,000,000 ) – Worst Case Scenario . I ’d guess you may do 1 billion operations per second , thus 3000 seconds . chore : Software Engineer
Design an algorithm to fiddle a game of Frogger and then cipher the answer …
The object of the game is to channelise a frog to avoid railcar while crossing a engaged road . You may constitute a route lane via an raiment . Generalize the result for an N - lane road . Here ’s the only answer we find for this one , from site Glassdoor.com : “ One approach is to write a recursive algorithm that determines when to “ wait ” or to “ leap ” to the next lane , depending if there is an approaching obstacle in the next lane . ” Job : Software Engineer
How many resumes does Google get each year for software program engineering science ?
This is another question that ’s about testing the task candidate ’s ability to couch the job in a simple way and then creatively solve it . Our answer : A candiate for Quantitative Compensation Analyst should know that Google hired about 3,400 people in 2008 . Figure 75 % , or 2,550 , of those hired were engineers and that , like Harvard , Google only accepted 3 % of those who utilize . 2,550 is 3 % of 85,000 . Job : Quantitative Compensation Analyst
You are pass a list of act … When you reach the end of the list you will derive back to the beginning of the list ( a round list ) . compose the most effective algorithm to find the minimal # in this list . Find any given # in the listing . The identification number in the list are always increasing but you do n’t know where the circular lean begin , ie : 38 , 40 , 55 , 89 , 6 , 13 , 20 , 23 , 36 .
Here ’s our favored answer , from reader “ dude ” : Create irregular pointer and start from the root . ( Most of the time rotary lists have a front and back cursor . ) correspond if front is larger or if back is larger . If front is tumid then you know you are at the remainder of the inclination and at the front of the list . If front is tumid then traverse the opposite management and compare number . If there is no etymon or a pointer point to any part of the list then your datum is lost in memory . problem : Quantitative Compensation Analyst
Daily Newsletter
Get the best technical school , science , and culture news in your inbox day by day .
word from the futurity , delivered to your nowadays .
Please take your desired newssheet and submit your e-mail to upgrade your inbox .