Sunday, May 2, 2021

System design: Leetcode.com | Google system design questions | My 30 minutes study

May 2, 2021

I got this article from Leetcode. The link is here

 Hi Everyone, in my previous LeetCode post, I discussed five of the most frequent system design interview questions that I have collected by browsing through multiple websites like LeetCode, Blind, 1point3acre, etc. You can view them in this LeetCode article - https://leetcode.com/discuss/interview-question/1002218/top-facebook-system-design-interview-questions

In this post, I am summarizing another five of the frequent system design interview questions.
Thanks to the LeetCode community for helping me prepare for the interviews. I hope this post will benefit everyone in their interview prep. 🙂

Design Proximity Server

Proximity servers are used to discover nearby attractions such as places and events, which are then recommended to Facebook users.

  1. Users can add, update, and delete places.
  2. Given a location expressed as latitude and longitude, users can query all the nearby places within a given distance.
  3. Optional Follow-up: Query events near a given place around a particular time. This adds the third dimension of time to the problem.

Design Typeahead Suggestions

Google predicts and suggests a list of autocomplete queries based on the characters that we have already typed in the search box.

  1. Suggest the top ten search queries based on the characters already typed by the user in the search box.
  2. Assume query's popularity can be determined by the frequency of the query being searched in the past.

Design Privacy Settings at Facebook

We can set different privacy levels for the Facebook posts we publish to be only visible to a specific set of users like public, friends, friends of friends, etc.

  1. Enable a user to specify the different levels of privacy for a post so that it is only visible to a particular set of users.
  2. Implement two levels of privacy, Public and Friends.
  3. Optional Complex Levels: friends of friends, custom groups

Design Top N Songs

This question is very similar to designing the system for Top N Trending topics.

  1. Get the top N songs for a user over the past X days.
  2. Assume popularity of a song can be determined by the frequency of the song being listened to in the past.

Design Web Crawler

Web Crawler scans the world wide web to download and index all the web pages to be made available for the search queries submitted by the users.

  1. Given a list of seed web pages, it should download all the web pages and index them for future retrieval.
  2. The service should handle duplicate web pages so that unique URLs are stored.

Learn more about the design goals, scale estimations, high-level design overview, and detailed architecture diagram of these problems in this video - https://youtu.be/Hq8pZ8G2Lm8

Source: The article published on Dev.to: https://dev.to/theinterviewsage/top-facebook-system-design-interview-questions-part-2-1844

system designgoogledesignonsitefacebook system designfaangonsite-interviewfacebook interviewfacebook onsite roundfacebook

No comments:

Post a Comment