CS小硕,有一年半经验
OA:
- 第一题
-
第二题
- Given a 2D matrix, start point and end point, find the shortest path from start to end point. 1 signifies obstacles and 0 signifies cell can be travelled through. (BFS preferably, can also be solved through DFS)
Onsite:
-
第一轮
- 2-3 LP questions
- Design an Amazon locker
- The interviewer asked me to OOD a locker system and also write working code for the same
- Follow up questions included expanding the design to accomodate various different types of lockers like regular, freezing, hot, etc.
-
第二轮
- 2-3 LP questions
- Given start date and end date, return number of months and days in between
- Example: 10/01/2019 - 11/02/2020. Output: 13 months, 2 days
-
第三轮
- 2-3 LP questions
- Given a list of co-ordinates, return the center of the circle such that maximum points from the list lie on the circumference of the circle
- Interview helped to recall the property that only 1 circle can pass through any set of 3 points
- Further simplified by providing an already available method which returns center of the circle when 3 points are passed as input.
- Could come up with O(n^3) answer which he agreed was the best we could do
-
第四轮
- 2-3 LP questions
- OOD a system which has multiple warehouses connected by a transport system
- Further expanded the question by including different ways
- Only class-inheritance structure and major methods required