12
返回列表 发新帖
楼主: edward_yang
跳转到指定楼层
上一主题 下一主题
收起左侧

Amazon new OA1

🔗
 楼主| edward_yang 2016-2-18 04:14:44 | 只看该作者
全局:
没onsite通知. 估计挂了吧。
回复

使用道具 举报

🔗
lunatic 2016-2-18 09:16:47 | 只看该作者
全局:
说不定过几天就有了吧,加油!
回复

使用道具 举报

🔗
laonong15 2016-2-18 23:55:19 | 只看该作者
全局:
Here is the possible solution :

1. Use a HashSet<String> courseSet and store all the courses made by the user
2. Keep one more HashMap<Course, Integer> recommendation
2. Get the list of Friends for the user
3. Iterate through the friends list and in that find the courses selected by the friend
4. If the course present in courseSet, omit else, put it in recommendation and increment it's count by 1.
5. After all the friends are evaluated. Sort the recommendation by it's value,  

it's O(n) Space  because n is the number of courses selected in total by all your friends.
  it would be O(k*p) where k is the number of friends and p is the number of courses a friend selects

The only thing  confuse me is   
do we  need get  all the friends' friends  and add to friends list,  It will depend on  giving  function " getFirendsListForuser"
回复

使用道具 举报

🔗
didi2 2016-2-19 01:42:03 | 只看该作者
全局:
祝楼主好运
回复

使用道具 举报

🔗
olivekola 2016-2-19 07:24:15 | 只看该作者
全局:
请问楼主是new grad找全职么?  还是说楼主以及有几年经验了呢?
回复

使用道具 举报

🔗
panlong222 2016-2-19 08:30:23 | 只看该作者
全局:
楼主海投的? 啥时候投的呀?祝楼主通过!
回复

使用道具 举报

🔗
daykills 2016-2-24 09:39:07 | 只看该作者
全局:
你这应该是HackerRange的题吧,和他们说的OA不是一类。我也是刚面了这个,题目好类似。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

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