I would like to submit the following question I was asked recently during my technical interview at Google. I'm rephrasing the question to make it clear for everyone to understand: - You are going on a one-way flight trip that includes billions of layovers. - You have 1 ticket for each part of your trip (i.e: if your trip is from city A to city C with a layover in city B, then you will have 1 flight ticket from city A to city B, and 1 flight ticket from city B to city C. - Each layover is unique. You are not stopping twice in the same city. - You forgot the original departure city. - You forgot the final destination city. - All the tickets you have are randomly sorted. Question are: - Design an algorithm to reconstruct your trip with minimum complexity. - How would you improve your algorithm. Example: - randomly sorted: New York->London San Francisco-> Hong Kong Paris->New York London->San Francisco - sorted: Paris->New York New York->London London->San Francisco San Francisco-> Hong Kong
3 5247Post New Google Software Design AllOther Interview Questions
is motorized valve closed when power shutoff?
What is pga_aggregate_target?
What is the use of GMV in turbine?
What happens if the number of reducers is 0 in Hadoop?
What is Difference between WSS 2.0 , WSS 3.0 , MOSS 2007 ?
What is the key role of a new regional manager in a pharmaceuticals company and how he will manage his people effectively?
please send me database stored procedure checklist.
Being a HRM how will you formulate an effective HRP process.
What are the ctrl shortcuts in excel?
Which ami does amazon elastic beanstalk uses?
What is the Virtual Node in Cassandra ?
How promotions are created and stored in wcs?
Is magento commerce free?
What is infeasible path?
What are the major data structures used in the following areas : network data model & hierarchical data model?