Full Stack Web Development Internship Program
- 5k Enrolled Learners
- Weekend/Weekday
- Live Class
Amazon is world’s largest e-commerce company. Even in 2020 when millions of jobs were lost, according to Forbes, Amazon recruited 100,000 professionals. It is one of the biggest companies in the world, which has its business roots in many domains. If you’re planning to apply for a job at Amazon, you’ve landed at the right place. In this Amazon Interview Questions blog, we will cover almost all aspects of applying to Amazon.
Following are the topics that we will cover in this Amazon Interview Questions blog:
Amazon Interview Process
Amazon Interview Behavioural Questions
Amazon Technical Interview Questions
Tips for Bar raising Questions
Tips to Crack the Interview
Amazon Leadership Principles
If you’re not into reading and want to refer a video , here is a video on Amazon Interview Questions and blogs, be sure to check it out!
The first step in getting your dream job at amazon is knowing the hiring process for Amazon Interviews. Let us understand the process of applying a job at Amazon.
Step 1: Applying for a Job at Amazon
Job application is one of the first steps in getting a step closer to getting your dream job. There are numerous ways in which you can do this step.
Step 2: Interview Rounds in Amazon : Amazon offers four rounds of interviews, as well as an initial coding test. Data Structure or Algorithms problems make up the coding portion of the exam. The first round is an HR round in which the candidate is asked behavioural questions as well as Computer Science theory questions. The next three rounds are entirely dedicated to DS/Algorithms.
After the Interviews: After these rounds, the recruiter contacts the candidate and informs them of the outcome. Along with technical capabilities, they look at the candidate’s leadership values.
After getting Hired: Once the team and you are both comfortable and ready to begin, the recruiters will prepare and share an offer letter with you, and you will be hired!
The first round in the Amazon Interview Process is an HR Screening round, here you will be asked Amazon Behavioural Interview Questions. This round is relatively easy than other rounds, but you should know what to speak, and what to expect. In the section of Amazon Interview Questions, we will take a deep dive into Amazon Behavioural Interview Questions.
The next round, depends on your profile. If you are applying for a technical role the following questions will be asked. Let’s take a deep dive into Amazon Technical Interview Questions.
There is more than one way of approaching each of the technical questions , be prepared with every possible approach.
Also here I have used C++ as the language you can use any language of your convenience. Now let’s look at some of the sample questions that’s frequently asked in the Technical round of Amazon Interview.
Q1. Write an efficient program for printing k largest elements in an array. Elements in array can be in any order.
For example, if given array is [1, 23, 12, 9, 30, 2, 50] and you are asked for the largest 3 elements i.e., k = 3 then your program should print 50, 30 and 23.
There are many methods to approach this problem.
Method 1
K largest elements from arr[0..n-1]
1) Store the first k elements in a temporary array temp[0..k-1].
2) Find the smallest element in temp[], let the smallest element be min.
3-a) For each element x in arr[k] to arr[n-1]. O(n-k)
If x is greater than the min then remove min from temp[] and insert x.
3-b)Then, determine the new min from temp[]. O(k)
4) Print final k elements of temp[]
Time Complexity: O((n-k)*k). If we want the output sorted then O((n-k)*k + k*log(k))
Method 3
1) Sort the elements in descending order in O(n*log(n))
2) Print the first k numbers of the sorted array O(k).
</pre> #include <bits/stdc++.h> using namespace std; void kLargest(int arr[], int n, int k) { sort(arr, arr + n, greater<int>()); for (int i = 0; i < k; i++) cout << arr[i] << " "; } int main() { int arr[] = { 1, 23, 12, 9, 30, 2, 50 }; int n = sizeof(arr) / sizeof(arr[0]); int k = 3; kLargest(arr, n, k); } <pre>
Q2. What are class and object in C++?
A class is a user-defined data type that has data members and member functions. Data members are the data variables and member functions are the functions that are used to perform operations on these variables. An object is an instance of a class. Since a class is a user-defined data type so an object can also be called a variable of that data type.
class A { private: int data; public: void fun() { } };
Q3. Given an array of integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2 + b2 = c2.
</pre> class PythagoreanTriplet { static boolean isTriplet(int ar[], int n) { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { for (int k = j + 1; k < n; k++) { int x = ar[i] * ar[i], y = ar[j] * ar[j], z = ar[k] * ar[k]; if (x == y + z || y == x + z || z == x + y) return true; } } } return false; } public static void main(String[] args) { int ar[] = { 3, 1, 4, 6, 5 }; int ar_size = ar.length; if (isTriplet(ar, ar_size) == true) System.out.println("Yes"); else System.out.println("No"); } } <pre>
Q4. What is operator overloading?
Now this could be asked both in C++ and in Java.
Operator Overloading is a very essential element to perform the operations on user-defined data types. By operator overloading we can modify the default meaning to the operators like +, -, *, /, <=, etc.
class complex{ private: float r, i; public: complex(float r, float i){ this->r=r; this->i=i; } complex(){} void displaydata(){ cout<<”real part = “<<r<<endl; cout<<”imaginary part = “<<i<<endl; } complex operator+(complex c){ return complex(r+c.r, i+c.i); } }; int main(){ complex a(2,3); complex b(3,4); complex c=a+b; c.displaydata(); return 0; }
The new operator is used for memory allocation and deletes operator is used for memory deallocation in C++.
</pre> int value=new int; //allocates memory for storing 1 integer delete value; // deallocates memory taken by value int *arr=new int[10]; //allocates memory for storing 10 int delete []arr; // deallocates memory occupied by arr <pre>
Be prepared with many such questions for your technical round. You can refer websites like Hackerrank and other coding website, they are a good place for more such questions. Adding GitHub Link in your linkedin profile or resume will also help, try including your projects there. Now let’s move on, in this Amazon Interview Questions blog
Amazon has strong work ethics, which is reflected in their Amazon Leadership Principles. As an employee, no matter at which stage of your career you are joining, they expect you to show some leadership qualities when you work. Following are the amazon leadership principles which you will be checked for before you are hired for the role.
Jeff Bezos, the CEO and founder of Amazon has created 14 leadership principles on areas ranging from job interviews to a new project ideas in order to crack any kind of interview to ace any job interview in Amazon. Hence it very important that we are aware and thorough with these leadership principles. Now, let’s go ahead and see what these leadership principles are.
Customer Obsession
Leaders start with the customer and work backwards. They work vigorously to earn and keep customer trust. Although leaders pay attention to competitors, they obsess over customers.
Ownership
Leaders are owners. They think long term and don’t sacrifice long-term value for short-term results. They act on behalf of the entire company, beyond just their own team. They never say “that’s not my job”.
Invent and Simplify
Leaders expect and require innovation and invention from their teams and always find ways to simplify. They are externally aware, look for new ideas from everywhere, and are not limited by “not invented here”. As we do new things, we accept that we may be misunderstood for long periods of time.
Are right, A Lot
Leaders are right a lot. They have strong judgment and good instincts. They seek diverse perspectives and work to disconfirm their beliefs.
Learn and Be Curious
Leaders are never done learning and always seek to improve themselves. They are curious about new possibilities and act to explore them.
Hire and Develop the Best
Leaders raise the performance bar with every hire and promotion. They recognise exceptional talent, and willingly move them throughout the organisation. Leaders develop leaders and take seriously their role in coaching others. We work on behalf of our people to invent mechanisms for development like Career Choice.
Insist on the Highest Standards
Leaders have relentlessly high standards – many people may think these standards are unreasonably high. Leaders are continually raising the bar and driving their teams to deliver high quality products, services and processes. Leaders ensure that defects do not get sent down the line and that problems are fixed so they stay fixed.
Think Big
Thinking small is a self-fulfilling prophecy. Leaders create and communicate a bold direction that inspires results. They think differently and look around corners for ways to serve customers.
Bias for Action
Speed matters in business. Many decisions and actions are reversible and do not need extensive study. We value calculated risk taking.
Frugality
Accomplish more with less. Constraints breed resourcefulness, self-sufficiency and invention. There are no extra points for growing headcount, budget size or fixed expense.
Earn Trust
Leaders listen attentively, speak candidly, and treat others respectfully. They are vocally self-critical, even when doing so is awkward or embarrassing. Leaders do not believe their or their team’s body odor smells of perfume. They benchmark themselves and their teams against the best.
Dive Deep
Leaders operate at all levels, stay connected to the details, audit frequently, and are skeptical when metrics and anecdote differ. No task is beneath them.
Have Backbone; Disagree and Commit
Leaders are obligated to respectfully challenge decisions when they disagree, even when doing so is uncomfortable or exhausting. Leaders have conviction and are tenacious. They do not compromise for the sake of social cohesion. Once a decision is determined, they commit wholly.
Deliver Results
Leaders focus on the key inputs for their business and deliver them with the right quality and in a timely fashion. Despite setbacks, they rise to the occasion and never settle.
Strive to be Earth’s Best Employer
Leaders work every day to create a safer, more productive, higher performing, more diverse, and more just work environment. They lead with empathy, have fun at work, and make it easy for others to have fun. Leaders ask themselves: Are my fellow employees growing? Are they empowered? Are they ready for what’s next? Leaders have a vision for and commitment to their employees’ personal success, whether that be at Amazon or elsewhere.
Success and Scale Bring Broad Responsibility
We started in a garage, but we’re not there anymore. We are big, we impact the world, and we are far from perfect. We must be humble and thoughtful about even the secondary effects of our actions. Our local communities, planet, and future generations need us to be better every day. We must begin each day with a determination to make better, do better, and be better for our customers, our employees, our partners, and the world at large. And we must end every day knowing we can do even more tomorrow. Leaders create more than they consume and always leave things better than how they found them.
Surely by now in this Amazon Interview Questions blog you’re tempted to apply for a job at Amazon now that we’ve learned about the company’s rich history, work culture, and leadership values. Here are some tips to help you ace your Amazon interview and get hired:
We hope this blog on Amazon Interview Questions covers all your doubts and questions about the Amazon Interview Process. Make sure to check out the video if you need to understand better. All the best for your interview! Happy Learning!