Amazon Interview Question for Web Developers


Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
1
of 1 vote

I would think that firstly even while typing the text, system would perform "Auto Suggest" and display the actual word.

Once I submit the search, system could first search the Cache to retrieve entire records relevant to women sandal. Cache inturn could be designed such that products and offers related to women sandal is present.

Also the cache is populated using frequently searched products, considering user preferences and also his past orders(Heuristics)

After displaying cache, I would think system then queries the main DB to fetch remaining records (only if user wishes to see further pages of products ).

Besides getting product data, system could same time retrieve relevant offers, availability and other such params

Corner case if user is searching for a non-existent or unmatched string, system retrieves the data based on 'similarities' logic or plainly can say no data found.

Technically, to retireve these data, there will be services that query from various local and redundant data storage (using a Map Reduce logic) and consolidate the results in UI.

For fault tolerance, if due to any reason user search is incomplete (say site is down or lost net connection or no matching exists at that point) , system can treat this request as a batch job (async) and prepare and store the results to be shown later when system is back.

Say when there is enormous data related to women sandals, compressed tries can be used to create and index the data.

Cache can be simply memcache (for limited data) or implemented using other caching mechanisms such as pagination etc.

Let me know ur thoughts

- rsumankumar February 21, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would think that cache only will be used unless this is more of an advanced and specific search.
I would also assume that some recommender mechanism will kick in, considering the specific user profile: his/her personal information, history of purchasing other similar identified users etc.

- Arie March 05, 2018 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More