Serving the Quantitative Finance Community

 
User avatar
rcarlton88
Topic Author
Posts: 0
Joined: August 1st, 2007, 2:47 am

Google Interview Question

December 3rd, 2007, 12:58 am

A question encountered at a Google interview.The person was hired.What is the quickest way to find the last name Ostark in a phone book if you can only open the book and if it is not on that page you must close the phone book and try again. AKA-you cannot flip through the pages, after each guess you must close the book and then reopen it.
 
User avatar
Vassili
Posts: 0
Joined: September 15th, 2006, 12:30 pm

Google Interview Question

December 3rd, 2007, 8:11 am

One way would be to make guesses based on the thickness of the phone book. E.g. I start by guessing that Ostark is at the 3/5 of the book. I open it at the 3/5's and if I see, for example, Richards, I'll know that I have to adjust my second guess upwards....
 
User avatar
MCarreira
Posts: 64
Joined: January 1st, 1970, 12:00 am

Google Interview Question

December 3rd, 2007, 10:15 am

Fold the page you opened so a part of it stands out ?
Last edited by MCarreira on December 2nd, 2007, 11:00 pm, edited 1 time in total.
 
User avatar
NE1
Posts: 0
Joined: August 5th, 2002, 11:36 pm

Google Interview Question

December 3rd, 2007, 10:54 am

Is trickery allowed? For example like McCarreira suggested folding the page or can one tear out the incorrect page? If the answer is no, may be a binary search? Actually can we call someone on that page and ask him/her to look it up for us?
 
User avatar
Lapin
Posts: 5
Joined: July 24th, 2002, 12:51 pm

Google Interview Question

December 3rd, 2007, 11:54 am

actually if the definite goal is to call this person, I will call operator Otherwise, I will split it in the middle and remove the first half.Then close teh book, split it in 2 and remove the last half... and so on
 
User avatar
farmer
Posts: 63
Joined: December 16th, 2002, 7:09 am

Google Interview Question

December 3rd, 2007, 1:44 pm

QuoteOriginally posted by: rcarlton88What is the quickest way to find the last name Ostark in a phone book if you can only open the book and if it is not on that page you must close the phone book and try again. AKA-you cannot flip through the pages, after each guess you must close the book and then reopen it.The quickest way is to change the rules, dumbass.
Antonin Scalia Library http://antoninscalia.com
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Google Interview Question

December 3rd, 2007, 2:27 pm

Open the phonebook anywhere. Write "Ostark" in it. Done."Rule changing" is always an interesting metabrainteaser problem. How far can one push the solution outside the stated confines of the problem? How much should one infer a higher-level problem (e.g., reaching "Ostark" on the phone) to solve the unstated true problem? How much should real world, devil-in-the-details factors affect the solution?Some of this rule changing should be in the context of the questioner. With Google, I'd think about a parallel distributed solution or a solution in which leverages freely available data. The question asks for "quickest" not "least total effort" so that leave open the option to tap into multiple processors.
 
User avatar
TraderJoe
Posts: 1
Joined: February 1st, 2005, 11:21 pm

Google Interview Question

December 16th, 2007, 1:35 am

Have a ton of numbered bookmarks.
 
User avatar
Ond
Posts: 0
Joined: October 11th, 2002, 2:47 pm

Google Interview Question

January 10th, 2008, 9:31 am

If you open the book and all the names are before ostark in alphabetical order:you tear out all the pages on the left side and the close the book and repeat.If you open the book and all the names are after ostark. You tear out all the pages on the right side...Continue until you find Ostark.
 
User avatar
ChicagoGuy
Posts: 0
Joined: April 13th, 2007, 1:45 am

Google Interview Question

January 12th, 2008, 1:26 am

Probably consider all words that would probably not appear as a first letter of a name. Eliminate Y, Z, X, U, K, Q, V, ..? Then take ratio 15/(26-7). Then take ruler and measure 15/19 up from start. Open and look at letter you are at. Then say if you are at P, then do a similar count with second letter of name. Now you take portions of 1/19th from book. So if you open at Perry you would look 15/(26-7)- 4/(1/19) from the start, since there are around four letters that would likely follow a first between s, t, u, v, w, x, y, z, a, b, c, d, e . Do the same repetition until success. However you would need a ruler for this....and I am not sure of which letters are more likely to appear in different places of names.