Amazon Interview Question for Software Engineer / Developers


Country: United States




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

we can keep track the last entry in O(1) time

Searching will be O(n) to get the first element time O(n)

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

abc

- Abc March 20, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

abc

- Abc March 20, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

FILO data structure.
Think of it as a stack of plates, the last plate you put on top of the stack if the first plate you're going to get when you need to get something from the stack. And of course it comes with all the advantages and disadvantages that come with that. For example the last element might be in the stack for a long time before it can be accessed since you need to get all the elements that were put in the stack after if first before getting to it.
Also getting an element from the middle of the stack (random access) would naturally not be possible without having to make ugly hacks to get around the natural behavior like creating temporary structures to get an element, and then re-adding all the elements back to the original stack.

- luckless March 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hieu

- it is LIFO, not FILO :) March 23, 2012 | Flag


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