一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
码农求职神器Triplebyte:
不用海投,内推你去多家公司面试
Airbnb 数据科学职位
in analytics and inference
天天打游戏、照样领工资,
你要不要来?
把贵司招聘信息放这里
查看: 1912|回复: 4
收起左侧

Amazon Online Assessment 面经

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

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

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

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

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
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.. from: 1point3acres.com/bbs
Only provide your best answer to each part of the question.
.1point3acres缃
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:
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, 老生常谈……

(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
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 | 显示全部楼层
楼主方便说一下题是在哪里看到的吗?
回复 支持 反对

使用道具 举报

 楼主| 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-12-13 04:08

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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