a家線上面試題 - 面試

Aaliyah avatar
By Aaliyah
at 2014-01-22T01:10

Table of Contents

大家看看悲

Suppose you are an engineer on the Amazon Media team.
Your team needs to launch a new recommendation feature called
"stuff Your Friends are Buying".
The recommendation logic is based on the following rules:
1. customer should only be recommended product that their friends
bought but they haven't bought.

2. the recommendations priority is driven by how many friends have
purchased the same item; if multiple friends purchased the same item,
it should be higher in the recommendations than a product that
only one friend owns.

You are provided two library functions to help you
锠 getFriendsListForUser():returns a list of customer IDs
(strings that uniquely identify an Amazon user)
representing the friends of an Amazon user
锠 getPurchasesForUser():returns a list of product IDs
(strings that uniquely identify an item in the Amazon catalog)
for an Amazon user ordered by purchase time with newest
purchase first in list and oldest purchase last in list

For this evaluation, please:
1) Write a function that provides a ranked (high to low) list of recommendations (product IDs) for a provided user. You may use any IDE and framework that you are comfortable with.
2) Write code for a few key unit tests for your code.
3) Enumerate other unit test scenarios (code not required).
4) Provide the space and time complexity of your solution.

RECOMMENDATION: Cut and paste this question into a word document to have for reference.

--
Tags: 面試

All Comments

美國工作 再拿美國EE碩士或僅台灣EE碩士

Edward Lewis avatar
By Edward Lewis
at 2014-01-21T06:55
請問一下,uci extension的opt是屬於大學,碩士,博士哪個層級? 如果我曾經在美國讀碩士,拿過opt工作,那我還可以去念類似uci extension來伸請opt嗎? 還� ...

英文履歷表Resume格式寫法

Ivy avatar
By Ivy
at 2014-01-17T15:43
前一陣子幫很多人看過 Resume 和 CV 發現不少人的履歷實在長得不怎麼好看 很多美國人的也是一樣。 這篇文章是借來的,希望能幫到正在寫 Resume 找工作� ...

美國工作 再拿美國EE碩士或僅台灣EE碩士

Delia avatar
By Delia
at 2014-01-16T09:35
板上的大家好 我去年6月從台灣的NCTU電子所畢業 之後來美國UCI申請extension讀了6個月(接下來會再去實習3個月來符合OPT資格) 我來美國的目的很明確 就�� ...

Toshiba面試問題

Ula avatar
By Ula
at 2014-01-15T18:04
依我了解,未滿一年的工作經歷都會被認定為新卒,在薪資上並沒有商談空間。 至於這位網友的狀況, 只能說如果你認定你這半年的經歷無法為你加� ...

死不講公司名稱的head hunter

Cara avatar
By Cara
at 2014-01-15T08:24
※ 引述《ul6vmp (完全不知要叫啥)》之銘言: : 所以想問一下 像這種不講公司名稱的狀況很正常嗎?? : 因為感覺有點詭異 但又怕是自己孤陋寡聞 因而�� ...