Amazon Data Structures & Algorithms Interview Questions

Review this list of 24 Amazon data structures & algorithms interview questions and answers verified by hiring managers and candidates.
  • Amazon logoAsked at Amazon 

    "na"

    Nishigandha B. - "na"See full answer

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

    "Use Dijkstra's Algorithm with priority queue"

    Karthik R. - "Use Dijkstra's Algorithm with priority queue"See full answer

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

    " This is mostly correct and fairly fast. My code has a bug somewhere where it fails on cases like the last case, where there are negative number on both ends of the array and the sums . from collections import deque debug = True # False def prdbg(*x): global debug debug = True # False if debug: print(x) else: return def max_sum(arr, start, end): if type(arr) == type(''' "

    Nathan B. - " This is mostly correct and fairly fast. My code has a bug somewhere where it fails on cases like the last case, where there are negative number on both ends of the array and the sums . from collections import deque debug = True # False def prdbg(*x): global debug debug = True # False if debug: print(x) else: return def max_sum(arr, start, end): if type(arr) == type(''' "See full answer

    Data Structures & Algorithms
    Coding
  • "int a_array[10] = {3,6,4,7,2,1,9}; int index = 0; int index2 = 0; for ( index = 0; index < sizeof(a_array); index++ ) { int tmpindex = index + 1; if ( tmpindex <= sizeof(a_array) ) { for ( index2 = tmpindex; index2 < sizeof(a_array); index2++ ) { if ( aarray[index] <= aarray[index2] ) { print( "%d is the NGE of %d" array[index2], array[index]); break; "

    Mark S. - "int a_array[10] = {3,6,4,7,2,1,9}; int index = 0; int index2 = 0; for ( index = 0; index < sizeof(a_array); index++ ) { int tmpindex = index + 1; if ( tmpindex <= sizeof(a_array) ) { for ( index2 = tmpindex; index2 < sizeof(a_array); index2++ ) { if ( aarray[index] <= aarray[index2] ) { print( "%d is the NGE of %d" array[index2], array[index]); break; "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.

Showing 21-24 of 24