amazon sde2 online assessment: algorithm and ai debug challenges
Question Details
和地里其他面经差不多是一道40分钟算法的题目加上60分钟AI debug题。ai题目是关于full stack debug。我选的是Java sprintboot。可以选在python django还有其他的比如c++的framework但是进去了以后不能修改。所以不知道是不是因为是java的原因和地里的面筋不一样。
以下内容需要积分高于 200 您已经可以浏览
算法题:The input has int k as the number of consecutive bags that you will take, and a int array segment[n][3], where n is the number of segments. Each segment contains the start index, end index, and the money in the bag for that range. The end index is inclusive. The goal is to return maximum number of money you ca...
Full Details
和地里其他面经差不多是一道40分钟算法的题目加上60分钟AI debug题。ai题目是关于full stack debug。我选的是Java sprintboot。可以选在python django还有其他的比如c++的framework但是进去了以后不能修改。所以不知道是不是因为是java的原因和地里的面筋不一样。
以下内容需要积分高于 200 您已经可以浏览
算法题:The input has int k as the number of consecutive bags that you will take, and a int array segment[n][3], where n is the number of segments. Each segment contains the start index, end index, and the money in the bag for that range. The end index is inclusive. The goal is to return maximum number of money you can get by taking k bags consecutively. Example, k=5, n=4, segments = [[1,4,2], [6,6,5], [7,7,7], [9,10,1]],
returns 16 by taking bags from 3- 7, 2+2+0+5+7=16.
AI 题是关于一个Jira类似的平台可以写comment到issue上。主要的bug就是两个。第一个是create comment以后不显示。第二个是update comment以后不显示。两个bug都是比较简单的比如读了需要update的comment但是最后没有存,或者没有和issue link起来。需要注意的是要根据readme的api contract来fix。readme会告诉你如果user没有authn/z, 返回403/401和相关的error message。(这边也提醒了楼主需要检查一些edge case比如user 只能修改自己的comment。) 如果成功了应该返回什么status code所以需要改handler和service level files。test是根据api返回的status code和message来判断的。这点很关键。我一开始就是bug在ui上fix了但是test过不了。
第一次做ai面试感觉还是挺好玩的。ai会给你一些syntax的帮助比如怎么construct return response。但是不能直接帮你写代码。code base是toy project中比较大的根本看不过来但是实际上要改的file就两个三个。
但感觉就是100分钟oa加上性格测试题做的非常累。有可能的话还是跳过oa吧。
About This Question
This is a reported interview question from a amazon interview for a swe role (newgrad level) during the oa round reported in 2026.