# Amazon Interview Algorithm Questions

Today we’re going to show you what to expect during Amazon (or AWS) Software Development Engineer interviews, and what you should do to prepare.

This guide has directly helped candidates (like Jimmy C) to land SDE offers at Amazon, so take your time to understand the information provided in each section.

Candidates often under-prepare for questions about Amazon’s 16 Leadership Principles. This is a HUGE mistake because Amazon places much more emphasis on these behavioral questions than other top tech companies do.

Note: We have separate guides for Amazon software development managers, machine learning engineers, and data engineers, so take a look at those articles if they are more relevant to you.

### Level Order Traversal of Binary Tree

Given the root of a binary tree, display the node values at each level. Node values for all levels should be displayed on separate lines. Let’s take a look at the below binary tree. %0 node_1 100 node_2 50 node_1->node_2 node_3 200 node_1->node_3 node_1592254056130 25 node_2->node_1592254056130 node_1592254006797 75 node_2->node_1592254006797 node_1592253992644 350 node_3->node_1592253992644

Runtime Complexity: Linear, O(n)O(n)O(n)

Memory Complexity: Linear, O(n)O(n)O(n)

Here, you are using two queues: `current_queue` and `next_queue`. You push the nodes in both queues alternately based on the current level number.

You’ll dequeue nodes from the `current_queue`, print the node’s data, and enqueue the node’s children to the `next_queue`. Once the `current_queue` becomes empty, you have processed all nodes for the current level_number. To indicate the `new level`, print a line break (` `), swap the two queues, and continue with the above-mentioned logic.

After printing the leaf nodes from the `current_queue`, swap `current_queue` and `next_queue`. Since the current_queue would be empty, you can terminate the loop.

### Nick CamilleriHead of Career Skills Development & Coaching*Based on past data of successful IK students

Our tried & tested strategy for cracking interviews

The 4 areas you must prepare for

How you can accelerate your learnings

Do you know that only about 2% of those who apply at Amazon get through? The tech giant has a pretty rigorous hiring process. The recruiters carefully select all the Amazon coding interview questions to test the overall abilities of the applicants.Â

To face the Amazon coding challenge questions, youâll need a lot of practice, guidance, and the correct strategy. As the company receives thousands of resumes every year, youâll need to ace your tech interview to get through.

If you intend to acing Amazonâs coding interview, you must adopt the right strategy. Without that, beating the stiff competition is an uphill climb.Â

In this article, weâll look at the type of Amazon coding interview questions you can expect. These are the things we will discuss:

• The Complete Amazon Interview Process
• Different Levels at Amazon
• Amazon Coding Interview Questions
• Scoring and Evaluating System at Amazon Interviews
• FAQs on Amazon Coding Interview Questions
• Before we get to Amazon coding interview questions, weâll begin with everything you need to know about how Amazon conducts its interviews and what theyâre looking for. Letâs jump right in!

### Amazon Product Management/Tech PGM Interview Questions

Program managers usually report to a director or Sr. Eng. Manager. Some BUs have a director of Product Management, to whom the product managers report. Some BUs have product managers who report to Director SW Engg and in such cases, 1-3 product managers report to director SW Engg.Â

Let us now look at some Amazon interview questions involving Product Management:

• Who is your customer and how do you learn about them?
• What customer insights did you use to get product direction?
• How many engineers do you work with? – Scope and risks
• What experience do you have working with finance/legal/sales/mktg – breadth
• An example of using data to make decisions
• What has been your best GTM and why did it work?
• Did you face a situation where you had to make a choice between two good options? â higher order consequences
• How do you take goals and ensure that the engg. Teams can deliver them?
• Here are some Technical Product Management interview questions:

• Explain the most technically complex program you have managed.
• How do you manage risks? Did you ever take any calculated risks?
• How did you resolve disagreements between teams?
• How do you decide when to make a commitment?
• Take a look at some more Amazon TPM interview questions here.