Open In App

Amazon Interview Experience for SDE-1 (Off-Campus)

Last Updated : 03 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Status: 2021 graduate

Work: SDE1

Applied through amazon job portal.

Round 1(Online Coding Test): 2 questions, 120 minutes

  • Explanation with Time complexity and Space complexity
  • Array Manipulation question (Not remembered actually)
  • Rotting oranges (LC: medium)

Round 2(Technical Interview): No discussion on projects direct coding question were given

  1. You are riding a bus, suppose in the East direction (bus direction will not change). Given the capacity of bus ‘c’ and an array such that [numberOfPassengers, PickUpLocation, DropLocation]. Check if you can drop all the passengers at their destinations. Return true or false

    eg:

    a. Bus capacity, c=4
    [[3,1,5],[2,2,6]] -> Return false

    Explanation: Bus capacity is 4. You pick 3 passengers at location 1, then your bus capacity will be 4-3=1. Now at location 2, two more passengers are waiting but your capacity is 1 so you can’t pick 2 passengers. Hence, dropping all passengers at their destinations is not possible.

    b. Bus capacity, c=11
    [[3,2,7],[3,7,9],[8,3,9]] -> Return true

    Explanation:

    Capacity:11

    At location 2: Passengers = 3, Capacity = 11-3=8 (They will be drop at location 7)

    At location 3: Passengers = 8, Capacity = 8-8 =0 (They will be drop at location 9)

    At location 7: 3 people will be dropped, Capacity = 0+3=3,

    Passengers=3, New capacity = 3-3=0 (They will be drop at location 9)

    At location 9: All 11 passengers will be dropped (8+3).

    Hence, you pick all passengers and drop them all. Return true.

  2. Given an array, count pairs such that (arr[i]+arr[j])%60==0
    eg. [30,20,150,100,40]
    Output: 3

    Explaination : (30+150) = 180 % 60 == 0 , Count=1

    (20+100) = 120 % 60 == 0 , Count =2

    (20+40) = 60 % 60 ==0, Count =3

Round 3(Technical Interview):

Round 4:

  1. Basic introduction
  2. Project discussion
  3. Operating system question on – Internal and external fragmentation, best fit, next fit, worst fit, first fit, paging, virtual memory, different page replacement algorithms.
  4. DBMS- Discussion on Normalisation and its type (1NF, 2NF, 3NF, BCNF)

Round 5:

  • Introduction
  • Discussion on projects

2 coding questions:

  1. Print all pair of elements with minimum absolute difference in the array. Something like this – https://www.geeksforgeeks.org/sum-minimum-absolute-difference-array-element/#:~:text=For an element x present,abs is the absolute value.&text=Sort the array of size n.
  2. Given an array, count pairs such that (arr[i]+arr[j])%60==0
    eg. [30,20,150,100,40]
    Output: 3

    Explaination:
    (30+150) = 180 % 60 == 0 , Count=1
    (20+100) = 120 % 60 == 0 , Count =2
    (20+40) = 60 % 60 ==0, Count =3

    (Same question as asked in round 2)

  3. I was not able to solve one coding question in 3rd round. Was expecting a positive result because the last 2 rounds were awesome …. but luck was not with me 🙂

    Upvote if you like :))


    Like Article
    Suggest improvement
    Previous
    Next
    Share your thoughts in the comments

Similar Reads