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 6620Post New Google Software Design AllOther Interview Questions
What is font ms word?
What is sheet tabs in excel?
what is authorization object and authorization object class?
Why are decorators used in angular 2?
What are the three parameters on which car depends?
How to create drop down combos in html? Select tag?
HTML 5 provides drag and drop facility. How do you make an image draggable?
What is taskhostw exe?
what do you mean by cloud service?
What parameters control copy latches?
Which trace 255 command line options produces the trace file with the name?
Explain the classes in System.XML Namespace?
Explain what is sap script? What is the purpose of sap script?
What is the complexity of adding an element to the heap?
Describe a time when you anticipated a problem and developed a potential solution?