【通知】7月22,工业界资深数据科学家教你破解各大公司面试!


一亩三分地论坛

 找回密码
 获取更多干活,快来注册

一亩三分地官方iOS手机应用下载
查看: 1761|回复: 4
收起左侧

Amazon Online Assessment 面经

[复制链接] |试试Instant~ |关注本帖
medivhsteve 发表于 2014-3-23 06:15:53 | 显示全部楼层 |阅读模式

2014(1-3月) 码农类 硕士 全职@Amazon - 网上海投 - 在线笔试 |Other

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看,没有帐号?获取更多干活,快来注册

x
刚刚做完交掉。三题都是原题,我把题目都贴下来了。
(1)  Given a linked list of integers, write a function to determine whether the given list has a loop or cycle anywhere in the list. The integer values may not be relied upon to be distinct. You may use the JDK or the standard template library. Your solution will be evaluated on correctness, runtime complexity (big-O), and adherence to coding best practices. A complete answer will include the following:
Document your assumptions.鏈枃鍘熷垱鑷1point3acres璁哄潧
Explain your approach and how you intend to solve the problem
Provide code comments where applicable
Explain the big-O run time complexity of your solution. Justify your answer.
Identify any additional data structures you used and justify why you used them.
Only provide your best answer to each part of the question.

Cycle detection,老生常谈……
. visit 1point3acres.com for more.
(17)  A museum is selling tickets to a fundraiser. As people place orders, their customer IDs are appended to a linked list. Due to an error, too many tickets have been sold and the unfortunate customers must now be notified that they cannot purchase a ticket after all. Given the list and the number of customers to notify (k), return the node in the list for the first customer that needs to be notified. An optimal solution will not use any additional data structures. You may assume k is less than the number of nodes in the list. You may use the JDK or the standard template library. Your solution will be evaluated on correctness, runtime complexity (big-O), and adherence to coding best practices. A complete answer will include the following:
Document your assumptions
Explain your approach and how you intend to solve the problem. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴
Provide code comments where applicable
Explain the big-O run time complexity of your solution. Justify your answer.
Identify any additional data structures you used and justify why you used them.
Only provide your best answer to each part of the question.
Example:
Input: myList: 1 -> 8 -> 4 -> 2 -> 7 -> 13 -> 3 k: 2. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴
Output: 13 -> 3

Last K elements, 老生常谈……
-google 1point3acres
(4)  Find the K closest points to the origin in 2D plane, given an array containing N points. You can assume K is much smaller than N and N is very large. You need only use standard math operators (addition, subtraction, multiplication, and division). You may use the JDK or the standard template library. Your solution will be evaluated on correctness, runtime complexity (big-O), and adherence to coding best practices. A complete answer will include the following:.鐣欏璁哄潧-涓浜-涓夊垎鍦
Document your assumptions
Explain your approach and how you intend to solve the problem
.1point3acres缃Provide code comments where applicable
Explain the big-O run time complexity of your solution. Justify your answer.
Identify any additional data structures you used and justify why you used them.. 1point3acres.com/bbs
Only provide your best answer to each part of the question.


K closest points,老生常谈……

45分钟全部写完,45分钟跑了几个test case,希望一切顺利……. 1point3acres.com/bbs


补充内容 (2014-4-11 06:14):
三周后拿到onsite……继续刷题去了……

评分

2

查看全部评分

liuxinic 发表于 2014-3-27 10:27:32 | 显示全部楼层
关注一亩三分地公众号:
Warald_一亩三分地
楼主方便说一下题是在哪里看到的吗? 鏉ユ簮涓浜.涓夊垎鍦拌鍧.
回复 支持 反对

使用道具 举报

 楼主| medivhsteve 发表于 2014-3-28 04:57:27 | 显示全部楼层
回复 支持 反对

使用道具 举报

solokacher 发表于 2014-4-3 07:58:05 | 显示全部楼层
现在的online assessment可以跑test case了?
回复 支持 反对

使用道具 举报

 楼主| medivhsteve 发表于 2014-4-5 04:59:49 | 显示全部楼层
solokacher 发表于 2014-4-3 07:58 . 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
现在的online assessment可以跑test case了?

不是。在自己的机器上写几个test case跑了下……
回复 支持 反对

使用道具 举报

本版积分规则

关闭

一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明

custom counter

GMT+8, 2017-7-21 10:54

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

快速回复 返回顶部 返回列表