Amazon SDE2 OA
Recently I had given the Amazon first round online assessment for SDE2 role.
It was on Hackerearth with a mix of two question for 100 minutes (40 + 60). First question was medium level circular array question with prefix sum type. 2nd question was an AI assisted project code for a payment system where they had added few Unit testcases where the code was getting failed that need to fix.
Question 1: ( 40 minutes)
Company is expanding drone delivery network, consisting of m nodes arranged in ring (1-based indexing). Drone i can move to either adjacent neighbours in flyTime[i] time. And another integer array QueryList is given of size n.
Starting from the Node 1, Find minimum total time required to process all the QueryList.
Example: m= 3, flyTime = [3,2,1], n=4 and QueryList = [1,3,3,2]. Output is 4 seconds.
Constraints i cannot remember exactly but solution need to be in Linear time complexity.
Comment below if you need my solution.
Data structure needed: Circular array manipulation + Prefix sum.
Question 2: (60 minutes) AI assisted bug fix assignment with some unit testcase that need to pass and question was RBAC authorization based.
A payment system with Frontend and backend code was give in MVP. In backend (Springboot application layer -> controller -> service -> repository -> sql database & schema).
There was two different role. One was normal user who have the control to create and manage their payments. Another role was admin who can access everyone payment history and modify.
Readme was given for every api's and their responses in json and error code for login, access your payment history, create profile , take loan, delete data etc. The question was based on RBAC (Role based access controls) authorization in the backend system. The bugs was about 8- 10 that was mentioned in unit testcase file and it was like User sometime can also see the other person payment history, login page had issue etc.


