亚麻 amazon 面试经验分享
想要了解更多或获取我们的服务,欢迎添加微信 leetcode-king。我们提供专业的面试代面服务,助您轻松通过技术面试。
想要了解更多面试代面服务,扫码添加微信,获取更多信息:
面试内容
第一轮:Leetcode 题目
- 考察内容:经典算法与数据结构问题。
第二轮:全BQ (行为面试)
- 亚马逊风格的行为面试,重点考察候选人在实际工作中的沟通能力、团队合作和领导能力。
第三轮:两道BQ + 一道 OOD (面向对象设计)
- OOD 题目: 设计一个狗狗日托中心
- 有大型犬游乐场和小型犬游乐场,最大容量分别为 20 和 30。
- 需要提供狗的 ID。
- 实现 check-in 和 check-out 功能。
- 验证狗的年龄和疫苗接种情况 (假设已有相关函数)。
示例代码:
class DogDaycare:
def __init__(self):
self.large_dog_playground = []
self.small_dog_playground = []
def check_in(self, dog):
if dog.size == 'large' and len(self.large_dog_playground) < 20:
self.large_dog_playground.append(dog.id)
elif dog.size == 'small' and len(self.small_dog_playground) < 30:
self.small_dog_playground.append(dog.id)
else:
raise Exception("Playground is full!")
def check_out(self, dog):
if dog.size == 'large' and dog.id in self.large_dog_playground:
self.large_dog_playground.remove(dog.id)
elif dog.size == 'small' and dog.id in self.small_dog_playground:
self.small_dog_playground.remove(dog.id)
def verify_dog(self, dog):
# 假设已有验证函数 check_vaccine 和 check_age
if check_vaccine(dog) and check_age(dog):
return True
return False