Maximum profit by buying and selling a share at most k times
You have two lane road and there are two sensors,
- Sensor A only covers Right lane.
- Sensor B covers both Left and Right lane.
Input of the function is two arrays filled with 24 hours of data and value/item of array is tuple having direction and time. find following things,
- Total no of cars on Right and Left lane.
- Min and Max speed at sensor A.
- Min and Max speed at sensor B.
Finding no 1 is easy.
Only issue is with 2,3 as we don’t have any unit of distance given anywhere. I asked him he told that’s a problem ?
This what we can do without distance we can at-least find the minimum and maximum time for sensor A and B just traversing an array but after that finding a distance that’s still a mystery to me ? in last few minutes he told me take a guess and do it but no enough time.
Build an UBER platform no code discussion about how will you do it,
- How will handle locations (most updated) of the driver ?
- How will update the location of the driver (architecture of app or service to update) ?
- Find nearest driver ? (We can filter all drivers based on location)
- What if two cities are merged like Redmond and Bellevue then other car might be close but in second city where city filter want work ?
- How do you scale same app to other countries (like china) ?
- One you find the nearest driver how do pick them ? (I said ratings)
- What would do consider as good ratings ?
- Once you have 10 driver with 4.8 ratings how will you send the request ?
- What will you do if all 10 drivers receives and accepts 10 request simultaneously ?
Build Eclipse IDE. Told me to write down class diagram of all components.
- How will you handle Character Set ?
- How will you handle up key ?
- How will you handle code pre compilations ? different highlighting rules ?
- Where will be text render events in editor or page and why ?
No offer by the way.
In SDE-I two designing questions. I didn’t expected that. Even though i have done some designing over past 2 years but never attempted problem as big as an IDE.
Hope this helps and PEACE.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
- Amazon Interview Experience | Set 242 (1 Year Experience)
- Amazon Interview Experience | Set 391 (SDE-2, 5.5 years Experience)
- Amazon Interview Experience | 401 (3+Years Experience for SDE II)
- Amazon Interview Experience | Set 243 (2.5 Years Experience)
- Amazon Interview Experience | Set 241 (1.5 years experience)
- Amazon Interview Experience | Set 248 (4.8 Yrs Experience for SDE II)
- Amazon Interview Experience | Set 234 (For SDE-II)
- Amazon Interview Experience | Set 250
- Amazon Interview Experience | Set 432 (For SDE-2)
- Amazon Interview experience | Set 335
- Amazon Interview Experience | Set 234
- Amazon Interview Experience | Set 238 (For SDE)
- Amazon Interview Experience | Set 244 (For SDE-1)
- Amazon Interview Experience | Set 247 (For SDE 1)