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 6388Post New Google Software Design AllOther Interview Questions
Explain the difference between service, intent service, asynctask & threads?
How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)
What is a category in a supervisor?
How do you sort a string in alphabetical order in java?
What is moment of inertia?
Mention two types of dislocations.
How do you graph a regression in excel?
What are the three main types of rna? What is meant by heterogeneous rna?
How does AI optimize route planning and traffic management in transportation?
What do sorting do?
Are structs faster than classes?
shell script for reverse the string
Can we use jpa with mongodb?
Is it possible to get the full payment on cancelling the new policy in free look period? : insurance sales
What is an android one device?