Amazon Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
2
of 0 vote

I think all elevators follow what is known as elevator algorithm.
The elevator goes up until all ups - which include calls from up and requests to up by the people picked up are served. After the highest up is served, the elevator goes in the other direction, until the lowest down is served, and this repeats.

- acoader November 23, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I was asked this at Microsoft interview

- Anonymous January 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think a relevant answer would be by using the Disk Read/Write algorithms like F-Scan, C-Scan, etc.

- Nirav J Doshi January 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Guys, this is not a algorithm question, this is a OOD question.
Don't even try to think which algorithm the elevators use.
You only need to specify classes and their interactions.

- Anonymous March 14, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Well, the original poster did he say he asked for the algorithm too. What gives?

- T March 14, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

rgvsdep , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_viagra&oldid=1388#1>buy generic viagra</a> vcood.%$#@ , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_phentermine&oldid=1390#1>buy phentermine no prescription</a> iygy , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_levitra&oldid=1392#1>buy levitra online</a> qcopp , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_meridia&oldid=1394#1>cheap meridia</a> 68458 , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_prozac&oldid=1396#1>fluoxetine prozac</a> jhg$# , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_soma&oldid=1398#1>buy soma online</a> 55 , <a href=http://www.cs.virginia.edu/~skadron/wiki/hotspot/index.php?title=User:Buy_tramadol&oldid=1400#1>buy tramadol now</a>

- fanojinuida March 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It is a purely algorithm check and data structure usage question.

Follow Knuth's 'The Art of Computer Programming', Page 282 onward.

Good Luck!

- Maninder Singh June 07, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Elevator :
Responsibilities - no. of passengers aboard,destination floors,state & direction,current floor
Methods - load/unload passengers, current floor/passengers/dir/state
Attributes - passengers, floor, dir, state, elevator_id     
Passenger :
Res - keeps track of the destination floor
Mds - current_destination
Att - destination_floor
Observer :
Res - keeps track of the passengers entering & leaving the elevator
Mda - total_entry/exit_passengers,passenger_enter/exit
Att - total_entry/exit_passengers

We can just model the above info. with the help of OOPs concepts

- ana October 01, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

SOA presents the big picture of what you can do with Web services. Web services specifications define the details needed to implement services and interact with them. However, SOA is an approach to build distributed systems that deliver application functionality as services to end-user applications or to build other services. SOA can be based on Web services, but it may use other technologies instead. In using SOA to design distributed applications, you can expand the use of Web services from simple client-server models to systems of arbitrary complexity.

Thus, individual software assets become the building blocks to develop other applications. You can reduce the complexity of systems by using a common style of interaction that works with both new and legacy code (Lawrence Wilkes, of CBDi, has joked that SOA could stand for “Save Our Assets" ). There is a standard way of representing and interacting with these software assets; now the focus shifts to application assembly based on these building blocks.

While discussing SOA for business applications here, SOA is also being used for other distributed systems such as grid computing and advanced Web services specifications (for example, WS-DistributedManagement, WS-Trust, and UDDI).

- Anonymous July 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Such Questions Suck.. make life miserable

- Anonymous December 07, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

programming elevator design visit

youtube . com/watch?v=fITuhLSwbt8

- anish February 05, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Data structures required for the elevators should be first a HashSet<Floor_Number> and then PriorityQueue

The reason for Hashing because there should be no same floor value, and then PriorityQueue because it will returns the lowest value to reach next floorNumber

- Av2711 March 05, 2018 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More