一亩三分地论坛

 找回密码
 获取更多干货,去instant注册!

扫码关注一亩三分地公众号
查看: 902|回复: 4
收起左侧

Amazon Online Assessment 面经

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

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

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

您需要 登录 才可以下载或查看,没有帐号?获取更多干货,去instant注册!

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:. 1point 3acres 璁哄潧
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.. Waral 鍗氬鏈夋洿澶氭枃绔,
Only provide your best answer to each part of the question.

Cycle detection,老生常谈……

(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:. visit 1point3acres.com for more.
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.鏈枃鍘熷垱鑷1point3acres璁哄潧
Output: 13 -> 3
鏉ユ簮涓浜.涓夊垎鍦拌鍧.
Last K elements, 老生常谈……

(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. visit 1point3acres.com for more.
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.


K closest points,老生常谈……

45分钟全部写完,45分钟跑了几个test case,希望一切顺利……


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

评分

2

查看全部评分

liuxinic 发表于 2014-3-27 10:27:32 | 显示全部楼层
楼主方便说一下题是在哪里看到的吗?. From 1point 3acres bbs
回复 支持 反对

使用道具 举报

 楼主| 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跑了下……
回复 支持 反对

使用道具 举报

本版积分规则

请点这里访问我们的新网站:一亩三分地Instant.

Instant搜索更强大,不扣积分,内容组织的更好更整洁!目前仍在beta版本,努力完善中!反馈请点这里

关闭

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

手机版|小黑屋|一亩三分地论坛声明 ( 沪ICP备11015994号 )

custom counter

GMT+8, 2016-12-4 11:59

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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