Amazon Software Engineer Interview Questions

Review this list of 112 Amazon software engineer interview questions and answers verified by hiring managers and candidates.
  • Amazon logoAsked at Amazon 

    "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"

    Anonymous Unicorn - "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"See full answer

    Software Engineer
    Coding
    +1 more
  • Amazon logoAsked at Amazon 
    Video answer for 'Design a URL shortener.'
    +19

    "I studied Exponent's TinyURL system design video. My interviewer was asking many detailed questions on API design, schema, as well as data required to store. I found system design questions are bit high level instead of depth. I think should have detail design of API, schema and some additional flavors."

    Yag S. - "I studied Exponent's TinyURL system design video. My interviewer was asking many detailed questions on API design, schema, as well as data required to store. I found system design questions are bit high level instead of depth. I think should have detail design of API, schema and some additional flavors."See full answer

    Software Engineer
    System Design
    +1 more
  • Amazon logoAsked at Amazon 
    Video answer for 'Implement a k-nearest neighbors algorithm.'
    +4

    "Even more faster and vectorized version, using np.linalg.norm - to avoid loop and np.argpartition to select lowest k. We dont need to sort whole array - we need to be sure that first k elements are lower than the rest. import numpy as np def knn(Xtrain, ytrain, X_new, k): distances = np.linalg.norm(Xtrain - Xnew, axis=1) k_indices = np.argpartition(distances, k)[:k] # O(N) selection instead of O(N log N) sort return int(np.sum(ytrain[kindices]) > k / 2.0) `"

    Dinar M. - "Even more faster and vectorized version, using np.linalg.norm - to avoid loop and np.argpartition to select lowest k. We dont need to sort whole array - we need to be sure that first k elements are lower than the rest. import numpy as np def knn(Xtrain, ytrain, X_new, k): distances = np.linalg.norm(Xtrain - Xnew, axis=1) k_indices = np.argpartition(distances, k)[:k] # O(N) selection instead of O(N log N) sort return int(np.sum(ytrain[kindices]) > k / 2.0) `"See full answer

    Software Engineer
    Coding
    +2 more
  • Amazon logoAsked at Amazon 
    Video answer for 'Given an nxn grid of 1s and 0s, return the number of islands in the input.'
    +10

    " from typing import List def getnumberof_islands(binaryMatrix: List[List[int]]) -> int: if not binaryMatrix: return 0 rows = len(binaryMatrix) cols = len(binaryMatrix[0]) islands = 0 for r in range(rows): for c in range(cols): if binaryMatrixr == 1: islands += 1 dfs(binaryMatrix, r, c) return islands def dfs(grid, r, c): if ( r = len(grid) "

    Rick E. - " from typing import List def getnumberof_islands(binaryMatrix: List[List[int]]) -> int: if not binaryMatrix: return 0 rows = len(binaryMatrix) cols = len(binaryMatrix[0]) islands = 0 for r in range(rows): for c in range(cols): if binaryMatrixr == 1: islands += 1 dfs(binaryMatrix, r, c) return islands def dfs(grid, r, c): if ( r = len(grid) "See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Amazon logoAsked at Amazon 

    "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "

    Anonymous Unicorn - "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Amazon logoAsked at Amazon 
    +39

    "Arrays.sort(inputarray) sliding window with a size of 2. Check for the sum in the sliding window. subtract the start when window moves"

    Sridhar R. - "Arrays.sort(inputarray) sliding window with a size of 2. Check for the sum in the sliding window. subtract the start when window moves"See full answer

    Software Engineer
    Data Structures & Algorithms
    +5 more
  • Amazon logoAsked at Amazon 

    "Understanding the Basics Choosing Learning Resources Practicing and Applying Knowledge Seeking Help and Staying Updated Leveraging Modern Tools"

    An D. - "Understanding the Basics Choosing Learning Resources Practicing and Applying Knowledge Seeking Help and Staying Updated Leveraging Modern Tools"See full answer

    Software Engineer
    Behavioral
  • Amazon logoAsked at Amazon 
    Video answer for 'How do you consider the impact of your work on the world?'
    +11

    "this is not a helpful interview, she seems so unprepared, confusing, unable to netting it out :("

    Anonymous Giraffe - "this is not a helpful interview, she seems so unprepared, confusing, unable to netting it out :("See full answer

    Software Engineer
    Behavioral
    +3 more
  • Amazon logoAsked at Amazon 

    "Functional Requirement Monitor health, metrics Alert in case of failure/anomaly Visualize the live health Analyse machines on periodic basis Non Functional Should not exert load on machines low latency Highly scalable Logs/Metrics Gathering push - machine gather and send to system and low priority background thread along with batching pull - heart beat check (for offline machines) Processing Real time streaming using Kafka/kinesis + Flink TimeSeries database for stor"

    Sourabh G. - "Functional Requirement Monitor health, metrics Alert in case of failure/anomaly Visualize the live health Analyse machines on periodic basis Non Functional Should not exert load on machines low latency Highly scalable Logs/Metrics Gathering push - machine gather and send to system and low priority background thread along with batching pull - heart beat check (for offline machines) Processing Real time streaming using Kafka/kinesis + Flink TimeSeries database for stor"See full answer

    Software Engineer
    System Design
    +2 more
  • "I faced a problem about components re-rendering's and unnecessary requests API's which was causing performance complications in my applicactions. I had a structure that create, edit and delete task, so GET, POST, PUT and DELETE API's methods request was necessary and bring that to compliance without compromissing the performance is hard. I started involving componentes and async functions into the useMemo's and useEffect's to have more control, another improvement was take be careful with global"

    Rolemberg J. - "I faced a problem about components re-rendering's and unnecessary requests API's which was causing performance complications in my applicactions. I had a structure that create, edit and delete task, so GET, POST, PUT and DELETE API's methods request was necessary and bring that to compliance without compromissing the performance is hard. I started involving componentes and async functions into the useMemo's and useEffect's to have more control, another improvement was take be careful with global"See full answer

    Software Engineer
    Technical
    +2 more
  • Software Engineer
    Behavioral
  • "Our team were developing a HQ trivia for fitness. So at that moment our focus was developing an eye-catching animation for both iOS and Android. By the way, implementing an animation were hard without the progress of it. So we wanted to see an immediate progress. So I decided to use tools or libraries such as Lottie or Kite. Then it increased the quality and the productivity dramatically. So our designer were happy with it and also our dev team could reuse the code from the designed animation fr"

    Woongshik C. - "Our team were developing a HQ trivia for fitness. So at that moment our focus was developing an eye-catching animation for both iOS and Android. By the way, implementing an animation were hard without the progress of it. So we wanted to see an immediate progress. So I decided to use tools or libraries such as Lottie or Kite. Then it increased the quality and the productivity dramatically. So our designer were happy with it and also our dev team could reuse the code from the designed animation fr"See full answer

    Software Engineer
    Behavioral
    +1 more
  • Amazon logoAsked at Amazon 

    "Follow STAR Example: In my most recent role at x, we've been working every quarter to set our quarterly goals or even decide for the year but given in 2022 we've been through a great resignation phase there was a high attrition because of which we have overloaded engineering teams. During last quarterly planning, I started to question with my manager about giving a focus to our engineering, so we complete one thing absolutely fine which is more impactful for our customers and add immediate val"

    Ash I. - "Follow STAR Example: In my most recent role at x, we've been working every quarter to set our quarterly goals or even decide for the year but given in 2022 we've been through a great resignation phase there was a high attrition because of which we have overloaded engineering teams. During last quarterly planning, I started to question with my manager about giving a focus to our engineering, so we complete one thing absolutely fine which is more impactful for our customers and add immediate val"See full answer

    Software Engineer
    Behavioral
    +3 more
  • "I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem). While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"

    Zakery K. - "I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem). While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"See full answer

    Software Engineer
    Behavioral
  • "Here is my first shot at it. Please excuse formatting. To find the maximum depth of the dependencies given a list of nodes, each having a unique string id and a list of subnodes it depends on, you can perform a depth-first search (DFS) to traverse the dependency graph. Here's how you can implement this: Represent the nodes and their dependencies using a dictionary. Perform a DFS on each node to find the maximum depth of the dependencies. Keep track of the maximum depth encountered dur"

    Tes d H. - "Here is my first shot at it. Please excuse formatting. To find the maximum depth of the dependencies given a list of nodes, each having a unique string id and a list of subnodes it depends on, you can perform a depth-first search (DFS) to traverse the dependency graph. Here's how you can implement this: Represent the nodes and their dependencies using a dictionary. Perform a DFS on each node to find the maximum depth of the dependencies. Keep track of the maximum depth encountered dur"See full answer

    Software Engineer
    Coding
    +1 more
  • "Let’s say the matrix is m x n (i.e., m rows and n columns). Start from the top-right corner of the matrix. Move left if you see a 1. Move down if you see a 0. Keep track of the row index where you last saw the leftmost 1 — that row has the most 1s. public class MaxOnesRow { public static int rowWithMostOnes(int matrix) { int rows = matrix.length; int cols = matrix[0].length; int maxRowIndex = -1; int j = cols - 1; /"

    Khushbu R. - "Let’s say the matrix is m x n (i.e., m rows and n columns). Start from the top-right corner of the matrix. Move left if you see a 1. Move down if you see a 0. Keep track of the row index where you last saw the leftmost 1 — that row has the most 1s. public class MaxOnesRow { public static int rowWithMostOnes(int matrix) { int rows = matrix.length; int cols = matrix[0].length; int maxRowIndex = -1; int j = cols - 1; /"See full answer

    Software Engineer
    Coding
    +1 more
  • Amazon logoAsked at Amazon 
    +3

    "Should this question be BST, not just BT? Otherwise it would not be possible to reconstruct the tree solely based on the array regardless of its order"

    TreeOfWisdom - "Should this question be BST, not just BT? Otherwise it would not be possible to reconstruct the tree solely based on the array regardless of its order"See full answer

    Software Engineer
    Data Structures & Algorithms
    +2 more
  • Software Engineer
    Behavioral
  • "To recount an experience from my last project . We were at the initial stages of designing a new data platform to enhance our trading analytics capabilities. The conflict arose over the selection of a data processing framework. I was advocating for Apache Spark due to its scalability and performance benefits, especially for handling large volumes of derivatives data. Another senior team member preferred a different technology they had more experience with, which they believed would be easier to"

    Scott S. - "To recount an experience from my last project . We were at the initial stages of designing a new data platform to enhance our trading analytics capabilities. The conflict arose over the selection of a data processing framework. I was advocating for Apache Spark due to its scalability and performance benefits, especially for handling large volumes of derivatives data. Another senior team member preferred a different technology they had more experience with, which they believed would be easier to"See full answer

    Software Engineer
    Behavioral
    +1 more
Showing 61-80 of 112