Status: current SDE II, No Degree / Self Taught (5 years coding), 4 YoE @ startup w/ < 10 engineers
Position: SDE2 at Amazon ( I think )
Location: Bay Area
Date: January 12, 2022
This was only the Amazon Online Assessment
https://leetcode.com/discuss/interview-question/1688196/Amazon-or-Online-Assessment-or-Maximum-Number-of-Engineering-Teams
summary: given a pool of engineers, each assigned a skill rating, determine the maximum number of teams that can be constructed of exactly team size K, where the difference between the worst engineer and the best engineer (on each team) is less than, D.
I struggled pretty hard this this one and the way I tried to solve the problem, even at the time, felt dumb. I had a hard time classifying this problem and starting working assuming it was some kind of combinatorial search / optimization.
I tried to bound the function and turn it into a decision problem.
basically I created an array of possible team sizes : [0... number of engineers / team size]
and then performed binary search on the array, calling a canSolve function, where I determine if it's possible to arrange the engineers that number of teams. I was unable to get a working solution as the code I submitted was timing out for a few of the test cases.
https://leetcode.com/problems/minimum-adjacent-swaps-for-k-consecutive-ones/ - slightly modified, no k, you must move all 1s to the opposite side of all the 0s
Didn't realize until 2 minutes left that I had missed the detail of swaps needing to be between adjacent elements.
Overall pretty disappointed even though I went into this looking to gauge where I was at and figure out a realistic timeline to start applying aggressively. I had scored fairly well on the 3 recent Leetcode mock Amazon Online Assessments so I thought I would have a shot. The difficulty of the questions on the actual assessment was, I felt, far higher than what I had been getting in my mocks. Would love some advice on what to study for problems like Q1 where you need to optimize or find the maximum of some combinations.