Amazon Interview Question for Software Engineer / Developers






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

Arrays often have fixed size.. could be two dimensional where as Link List always points to another node There are types of Link List like Circular, etc..

- OldGuru April 20, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The advantage of continous memory is that the memory is assigned during compile time and hence we do not hold risk of running out of memory during run time coz its already there. where as in case of link list, every node is created on need basis and a chance may come where we run out of memory and no more nodes are created and the program execution halts.

- B April 28, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

A few reasons why contiguous memory are better is because
1) You have random access.
2) Better locality - Whenever the OS brings data into memory, it loads a whole page. Less page fault. With linked list, different parts of the linked list are stored at different parts of memory.
Branch Prediction doesn't work as well with linked list. This causes the pipeline to be flushed more often which result in poor performance.

- vodangkhoa April 29, 2007 | 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