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
- 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.
- 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):
- Discussion on project
- Similar question with some twist: The twist is inseated of sum I need to return maximum product (tree also contains negative nodes {Keep in mind: Product of two negative nodes can give maximum positive product) https://www.geeksforgeeks.org/maximum-sum-nodes-binary-tree-no-two-adjacent/amp/
- Reverse nodes in K-groups, LC: Hard
Round 4:
- Basic introduction
- Project discussion
- Operating system question on – Internal and external fragmentation, best fit, next fit, worst fit, first fit, paging, virtual memory, different page replacement algorithms.
- DBMS- Discussion on Normalisation and its type (1NF, 2NF, 3NF, BCNF)
Round 5:
- Introduction
- Discussion on projects
2 coding questions:
- 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/amp/#:~:text=For an element x present,abs is the absolute value.&text=Sort the array of size n.
- 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)
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 :))