Amazon Interview Question


Country: India




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

1.we will use B+ tree, cached data is stored at leaf which will be inside physical memory.
Since retreaving of data will become fast only latency will be there due to disk access.Since in B+ tree ,height should be minimum at disk level so latency will be nearly equal to 1 disk operation(if thr would be data at 1 height inside physical memory.)

2nd way :- first we can keep track for data by using LinkedHashMap in main memory. If data is not found and if key exist in the Map then will do search in Physical memory(db) and retrieve data according to that.

- sk June 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

can you eloborate on the answer

- kishore June 07, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Is the second way like directory based cache coherent protocol?

- wzyflyleaf June 09, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

What is the cache going to be used for?

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

Was this question asked for a Technical Lead or Architect role?
@sk: could you please elaborate on the answer.
PS: I have a F2F in Amazon next week for a SDE1 or SDE2 role. A good answer to this question would be much appreciated

- Dharmendra Prasad June 07, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

If you are going to interview for tech lead or architect, you probably should know this already!

- Anonymous June 07, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

(btw) I know you are interviewing for SDE1 and SDE2 and it (the cache question) is a valid question to ask such a candidate...

- Anonymous June 07, 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