The Amazon SDE Sheet is a curated collection of the most important topics and frequently asked questions in Amazon Software Development Engineer (SDE) interviews. It includes essential interview questions along with detailed solutions to help you prepare effectively and secure a role at Amazon.
To succeed, you must have a strong understanding of Data Structures & Algorithms (DSA), solid communication skills, analytical thinking, and the ability to solve real-world problems. The typical hiring process for Amazon SDE includes:
Amazon SDE Hiring Process
- Online Application
- Online Assessment Test (60 minutes)
- 2 medium-level coding questions
- 20 MCQs covering OOPs, DBMS, Operating Systems, Data Structures & Algorithms
- Technical Interview Round 1
- Project discussion, DS & algorithm-based coding problems, conceptual quizzes
- Focuses on real-world problem-solving ability
- Technical Interview Round 2
- More challenging DS & algorithm questions
- Bar Raiser Round
- Behavioral questions, leadership principles, project discussion, and cultural fit evaluation
Computer Fundamentals
There are three focused computer subjects, on the basis of those subjects MCQs will be there, we have designed top MCQs for that, so you can easily test your knowledge on those subjects.
- OOP MCQs with Answers
- DBMS MCQs with Answers
- Operating System MCQs with Answers
- Data Structures MCQs with Answers
- Algorithms MCQs with Answers
Language Based Questions
They can be asked language-based questions, to check your grasp of the language you used for the coding round.
Data Structure & Algorithms Questions
Array
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
- Largest Sum Contiguous Subarray [ Practice Problem ]
- Search in a row-wise and column-wise sorted matrix [ Practice Problem ]
- Print a given matrix in spiral form [ Practice Problem ]
- Program for array rotation [ Practice Problem ]
- Trapping Rain Water [ Practice Problem ]
- Count pairs with given sum [ Practice Problem ]
- Find the subarray with least average [ Practice Problem ]
- Convert array into Zig-Zag fashion [ Practice Problem ]
- Find duplicates in an array [ Practice Problem ]
- Find a triplet that sum to a given value [ Practice Problem ]
String
String are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’.
- Validate an IP Address [ Practice Problem ]
- Multiply Strings [ Practice Problem ]
- Implement Atoi [ Practice Problem ]
- Check if the string is rotated by two places [ Practice Problem ]
- Permutations of a given string [ Practice Problem ]
- Longest Repeating Subsequence [ Practice Problem ]
- Roman Number to Integer [ Practice Problem ]
- Length of the longest substring [ Practice Problem ]
- String formation from substring [ Practice Problem ]
- Check whether two strings are an anagram of each other [ Practice Problem ]
- Look-and-Say Sequence [ Practice Problem ]
- Remove minimum number of characters so that two strings become anagram [ Practice Problem ]
- Find the smallest window in a string containing all characters of another string [ Practice Problem ]
- Length of the longest substring without repeating characters [ Practice Problem ]
Linked List
Linked List is the data structure that can overcome all the limitations of an array. A Linked list is a linear data structure, in which the elements are not stored at contiguous memory locations, it allocates memory dynamically.
- Reverse a linked list [ Practice Problem ]
- Segregate even and odd nodes in a Linked List [ Practice Problem ]
- Detect loop in a linked list [ Practice Problem ]
- Delete all occurrences of a given key in a linked list [ Practice Problem ]
- Remove loop in Linked List [ Practice Problem ]
- Nth node from the end of linked list [ Practice Problem ]
- Merge K sorted linked lists [ Practice Problem ]
- Flatten a binary tree into linked list [ Practice Problem ]
- Add two numbers represented by linked lists [ Practice Problem ]
- Function to check if a singly linked list is palindrome [ Practice Problem ]
- Clone a linked list with next and random pointer [ Practice Problem ]
- Delete without head pointer [ Practice Problem ]
- Given a linked list of 0s, 1s and 2s, sort it [ Practice Problem ]
- Intersection of Two Linked Lists [ Practice Problem ]
Searching
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored.
- Search an element in a sorted and rotated array [ Practice Problem ]
- Square root of an integer [ Practice Problem ]
- First and last occurrences of x [ Practice Problem ]
- Find a peak element [ Practice Problem ]
- Find the smallest positive number missing from an unsorted array [ Practice Problem ]
- Allocate minimum number of pages [ Practice Problem ]
- Counting elements in two arrays [ Practice Problem ]
- Median of two sorted arrays of different sizes [ Practice Problem ]
Sorting
A Sorting Algorithm is used to rearrange a given array or list of elements according to a comparison operator on the elements. The comparison operator is used to decide the new order of elements in the respective data structure.
- k largest(or smallest) elements in an array [ Practice Problem ]
- Sort an array of 0s, 1s, and 2s [ Practice Problem ]
- Count Inversions in an array [ Practice Problem ]
- Merge Without Extra Space [ Practice Problem ]
- Minimum Platforms [ Practice Problem ]
- Quick Sort [ Practice Problem ]
- Heap Sort [ Practice Problem ]
- Merge k Sorted Arrays [ Practice Problem ]
- Overlapping Intervals [ Practice Problem ]
Stack
A stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the top. A stack follows the LIFO (Last In First Out) principle.
- Check for Balanced Brackets in an expression (well-formedness) using Stack [ Practice Problem ]
- Sort a stack using recursion [ Practice Problem ]
- The Celebrity Problem [ Practice Problem ]
- Next Greater Element [ Practice Problem ]
- Queue using two Stacks [ Practice Problem ]
Queue
A Queue is a linear data structure in which elements can be inserted only from one side of the list called rear, and the elements can be deleted only from the other side called the front. The queue data structure follows the FIFO (First In First Out) principle.
- Stack using two queues [ Practice Problem ]
- Connect n ropes with minimum cost [ Practice Problem ]
- Minimum time required to rot all oranges [ Practice Problem ]
- First negative integer in every window of size k [ Practice Problem ]
- Reversing a Queue [ Practice Problem ]
Tree
A tree is non-linear and a hierarchical data structure consisting of a collection of nodes such that each node of the tree stores a value, a list of references to nodes (the “children”).
- Inorder Traversal [ Practice Problem ]
- Preorder Traversal [ Practice Problem ]
- Kth largest element in BST [ Practice Problem ]
- Left View of Binary Tree [ Practice Problem ]
- Right View of Binary Tree [ Practice Problem ]
- Check for BST [ Practice Problem ]
- Diameter of a Binary Tree [ Practice Problem ]
- Boundary Traversal of binary tree [ Practice Problem ]
- Height of Binary Tree [ Practice Problem ]
- Lowest Common Ancestor in a Binary Tree [ Practice Problem ]
- Binary Tree to DLL [ Practice Problem ]
- Root to leaf path sum [ Practice Problem ]
- Reverse Level Order Traversal [ Practice Problem ]
- Construct Tree from Inorder & Preorder [ Practice Problem ]
- ZigZag Tree Traversal [ Practice Problem ]
- Serialize and Deserialize a Binary Tree [ Practice Problem ]
Graph
A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph.
- BFS of Graph [ Practice Problem ]
- DFS of Graph [ Practice Problem ]
- Find the number of islands [ Practice Problem ]
- Topological sort [ Practice Problem ]
- Steps by Knight [ Practice Problem ]
- Strongly Connected Components (Kosaraju's Algo) [ Practice Problem ]
- Alien Dictionary [ Practice Problem ]
- Dijkstra Algorithm [ Practice Problem ]
- Detect Cycle in a Directed Graph [ Practice Problem ]
- Detect cycle in an undirected graph [ Practice Problem ]
Trie
Trie is an efficient information retrieval data structure. Using Trie, search complexities can be brought to optimal limit (key length).
- Trie Insert and Search [ Practice Problem ]
- Trie Delete [ Practice Problem ]
- Print unique rows in a given Binary matrix [ Practice Problem ]
- Longest Common Prefix using Trie [ Practice Problem ]
- Minimum XOR Value Pair [ Practice Problem ]
- Palindrome pair in an array of words (or strings) [ Practice Problem ]
Heap and Hash
A Heap is a special Tree-based data structure in which the tree is a complete binary tree. Heap and hash is an efficient implementation of a priority queue. The linear hash function monotonically maps keys to buckets, and each bucket is a heap.
- Minimum Cost of ropes [ Practice Problem ]
- k largest elements [ Practice Problem ]
- Kth element in Matrix [ Practice Problem ]
- Find median in a stream [ Practice Problem ]
- Kth largest element in a stream [ Practice Problem ]
- Rearrange characters [ Practice Problem ]
- Nearly sorted [ Practice Problem ]
- Nuts and Bolts Problem [ Practice Problem ]
- Check if two strings are k-anagrams or not [ Practice Problem ]
- Sort an array according to the other [ Practice Problem ]
- Swapping pairs make sum equal [ Practice Problem ]
- Smallest distinct window [ Practice Problem ]
- Find first repeated character [ Practice Problem ]
BitMagic
Bit stands for binary digit. A bit is the basic unit of information and can only have one of two possible values that is 0 or 1.
- Find the Missing Number [ Practice Problem ]
- Power of 2 [ Practice Problem ]
- Reverse Bits [ Practice Problem ]
- Maximum subset XOR [ Practice Problem ]
- Check set bits [ Practice Problem ]
- Minimum X (xor) A [ Practice Problem ]
- Longest Consecutive 1's [ Practice Problem ]
- Number of 1 Bits [ Practice Problem ]
Recursion and Backtracking
Recursion: The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function.
Backtracking: Backtracking is an algorithmic technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point in time (by time, here, is referred to the time elapsed till reaching any level of the search tree).
- Write a program to print all permutations of a given string [ Practice Problem ]
- Rat in a Maze Problem - I [ Practice Problem ]
- Josephus problem [ Practice Problem ]
- Combination Sum [ Practice Problem ]
- Partition Equal Subset Sum [ Practice Problem ]
- N-Queen Problem [ Practice Problem ]
- Shuffle integers [ Practice Problem ]
- Hamiltonian Path [ Practice Problem ]
- Find the string in grid [ Practice Problem ]
- Pascal Triangle [ Practice Problem ]
- Solve the Sudoku [ Practice Problem ]
- Largest number in K swaps [ Practice Problem ]
Dynamic Programming
Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for same inputs, we can optimize it using Dynamic Programming.
- 0 - 1 Knapsack Problem [ Practice Problem ]
- Partition Equal Subset Sum [ Practice Problem ]
- Coin Change [ Practice Problem ]
- Longest Common Subsequence [ Practice Problem ]
- Stock buy and sell [ Practice Problem ]
- Interleaved Strings [ Practice Problem ]
- Edit Distance [ Practice Problem ]
- Stickler Thief [ Practice Problem ]
- Longest Common Substring [ Practice Problem ]
- Number of Coins [ Practice Problem ]
- Egg Dropping Puzzle [ Practice Problem ]
- Word Break [ Practice Problem ]
- Wildcard Pattern Matching [ Practice Problem ]
- Total Decoding Messages [ Practice Problem ]
- Jump Game [ Practice Problem ]
- Special Keyboard [ Practice Problem ]
- Longest Palindromic Subsequence [ Practice Problem ]
After qualifying the Online test you have to face 2 technical interviews, where they asked about Data Structure, algorithms, and different kinds of puzzles. Technical rounds are face-to-face algorithmic rounds in which candidates are presented with 2-4 questions, all from data structures. The most commonly asked DSs are the matrix, binary tree, BST, and Linked list. The second technical round is more difficult and more questions from Trees, BST, and Graph are asked. One should have a clear knowledge of tree-based recursion, and the standard questions based on it are a must.
P.S: After solving all the problems mentioned above you can answer the questions which will be asked in these rounds.
Puzzles: Puzzles are one of the ways to check your problem-solving skills. These are tricky questions that let you think logically. Amazon will test your problem-solving skills through the puzzles as well. Try to solve these 20 Puzzles Commonly Asked During SDE Interviews
Project Discussion: Thoroughly revise all the work you have done till now in your projects. The grilling about projects can sometimes be very deep. Mention only those topics where you think you are fine to be grilled upon. If you don't have any project they will not ask about it, but better to have some projects, it involves questions like what's new in your project if you have created a basic clone, or what's your input followed by questions based on your technology stack.
Note: If you have a project on AWS then you have to be confident enough to provide sufficient answers of each question,
To let you know in details about Amazon Recruitment Process, we have a article on that too so you can go through this post:
https://www.geeksforgeeks.org/interview-experiences/amazon-recruitment-process/