''' We want to implement a feature to suggest to users the cheapest hotel that is more popular than the one they are looking at. Write a function that given an array of hotels, sorted by their popularity returns a map from the hotel ids that associates each hotel with the cheapest hotel that is more popular than the one in question. if there is no hotel that is cheaper and more popular than the one with that id, then it shouldn't be put in the map. You can assume that hotel ids and prices are integers and that hotels have the following format: struct hotel{ int id; int price; } Example 1: input = [ { id => 123, price => 200 }, # Most popular { id => 55, price => 150 }, # Second most popular { id => 17, price => 70 }, # Third most popular { id => 18, price => 500 }, # ... { id => 27, price => 270 }, { id => 101, price => 230 } # Least popular ] output = { 18 : 17, 27 : 17, 101 : 17 }
Software Engineer V Interview Questions
666,374 software engineer v interview questions shared by candidates
Logic based questions. Scenarios. Code reviews
Overview of your previous experience and your team work
Problem solving # 1 : (9 marks) Input is [1,34,3,98,9,76,45,4] and the output should be 998764543431
How to would you find out whether a substring occurs in a given string?
Tell me about yourself
Suppose you are going from a jungle in your jeep. One of the wheel comes off its axel. All the wheels have 4 nut each to hold on to the axel. You dont have any mechanic shop near by. The place is dangerous so you cant go walking. How will you fix your car and resume your journey.
Reverse character string in python
Q: Describe some real life applications of machine learning
What is static methods
Viewing 2371 - 2380 interview questions
See Interview Questions for Similar Jobs
Software Applications EngineerSoftware Engineer SrSoftware Engineer Software DeveloperSoftware Engineer C#Senior Software Applications EngineerSoftware EngineeringSoftware Engineer SeniorSoftware Engineer RubyAssoc Software EngineerSoftware EngineerJr Software EngineerSoftware Development Engineer New GradSoftware Engineer VerserSoftware Engineer New GradSoftware Engineer CSoftware Engineering JavaSoftware Developer EngineerSoftware Development Engineer