Stuff My Friends Bought
Given two APIs to retrieve a person's purchases and friends, implement a function that returns all items purchased by a user's friends (excluding items the user has already bought), sorted by most frequently purchased.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
Amazon is developing a new feature that is called "Stuff my friends bought". You have a list of friends and want to know all the items your friends bought except the ones you already bought. Two APIs are available for you to use: // Returns the list of items bought by a person List<Item> function getPurchases(Person person) // Returns the list of friends of a person List<Person> function getFriends(Person person) Your task is to implement the function getStuffMyFriendsBought and return the list of items ordered by the most bought items.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.