跳至主要内容

博文

目前显示的是 五月, 2017的博文

新鲜出炉,Amazon SDE 面经(电面+Onsite)

刚刚参加完Amazon的面试,来写一下自己的面试过程。我申请的是SDE-1的职位。面试流程是2轮电面,4轮Onsite. 一开始是电面。 第一轮 电面 1 翻转字符串 reverse words in a string。 LintCode原题: http://www.lintcode.com/en/problem/reverse-words-in-a-string/ 参考答案: http://www.jiuzhang.com/solutions/reverse-words-in-a-string/ follow-up: 翻转的时候如何处理空格 划分数组。 LintCode原题: http://www.lintcode.com/zh-cn/problem/partition-array/ 参考答案: http://www.jiuzhang.com/solutions/partition-array/ 第二轮 电面2 链表求和。要求O(n)的时间复杂度。 LintCode原题: http://www.lintcode.com/zh-cn/problem/add-two-numbers/ 参考答案: http://www.jiuzhang.com/solutions/reverse-words-in-a-string/ Find all ancestors of LCA. 给出两个节点,打印出两个节点的所有公共祖先节点,算法也就是找出最近公共祖先(LCA),然后打印root到LCA的所有节点。 LintCode原题: http://www.lintcode.com/zh-cn/problem/lowest-common-ancestor/ 参考答案: http://www.jiuzhang.com/solutions/lowest-common-ancestor/ follow-up: 问了一些关于堆和宽度优先搜索(heap & BST)的知识点。像是什么时候用宽度优先搜索,这个在《九章算法班》有讲。 电面结束后几天,HR告诉我面试通过了,并安排我去参加Onsite. 第三轮 Onsite 1 面试官先是问了我一些简历上的问题,比如我简历上的项目经验,问的还算比较细。 接着问了1道算...