Amazon SDE 1 Virtual Onsite | USA | Remote / Seattle | New Grad
Anonymous User
1633

These were the questions asked at my on site for amazon:

  • (1) Given a curb of N spaces, how many ways can you plant trees in the curb so that no two consecutive spaces have trees.

    • Ex: N = 3: [1 0 1], [0, 1, 0], [1, 0, 0], [0, 0, 1], [0, 0, 0] --> return 5
    • I got stumped, it was some kind of discrete math type problem with arranging shit in an array. I hardcoded out the math logic for it, probably tanked my chances of an offer right here.
  • (2) Word break varation: https://leetcode.com/discuss/interview-question/545748/amazon-subsidiary-phone-concatenated-words

    • I just wrote a DFS for it similair to this link ^
  • (3) Write a function that would act like the "find" command in linux to search a directory based on a certain search criteria and given a directory. You can assume there is an API call that mimics the "ls" command to list out the items in the directory.

Comments (7)