Amazon Interview Question for Software Engineer / Developers


Team: SDE
Country: India
Interview Type: In-Person




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

I think you can explain in general how a binary heap tree works
and then the tree's properties
1. Complete binary tree
2. Heap property ( values < root node or values > root node)

- hello world February 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Heap should have the most wanted element in the top, and once it is removed the second most wanted element should be moved to the top.

Node is added at the leave and deleted from the root. So its a queue implementation. Sorting a queue based on some priority. Parent value should be less than the child's value based on this rule we can do upheaping(adding), or downheaping(deleting)

- vicky February 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A max/min heap is a tree( need not be a binary tree) that satisfies the following properties:
1. Every leaf node is of height h or h-1.
2. Every leaf node of height h appears to the left of every leaf node of height h-1.
3. The value in each node is greater/smaller than or equal to those in it's children( if any).

- Deepak Agrawal February 08, 2012 | 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