System Design Interview Questions
- -1of 5 votes
AnswersWhat happens during and after a query is being typed (autocomplete) in a search box whether the user is trying to go to a website or asking a question etc, and how do servers complete the request and what is the best (parallel) structure for the request to go through. DFS and how servers are located for proximity
- Guy January 30, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - -3of 5 votes
AnswersThe setup is that we are given a series of text files which contain information regarding a code repository's commits. Each file represents a single commit and they are formatted as follows:
- Guy January 29, 2014 in United States
"
Commit #: XXX
Author: XXX
Reviewer(s): XXX, XXX, ...
File: XXX
File: XXX
...
Date: XX:XX:XX XX/XX/XXXX
"
The commit number is unique and is generated in synchronous order. There is exactly 1 unique author. There are a variable number of reviewers, delimited by commas; if there are no reviewers, that line is absent from the file. There are a variable number of edited files in the commit, each receiving its own line. The time/date is when the commit was submitted.
First design a graphical model for all of the commit data. Then describe how this model is updated when a new commit is generated. Finally, write the code segment called when a new commit is generated which edits a system that has implemented your model of the data - its input is a file name and whatever necessary data structures that are maintained by your system.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - -1of 3 votes
AnswersHow would you design a social network and find or keep track of someone's oldest friend in a social network? Oldest friend means the friend that you have added for the longest time period. My solution to the first question is to represent friendship in a graph , storing a list of friends in each User object, and use breadth-first-search to find connection. Not sure about the second question though. My idea is either keep a reference to the oldest friend as a member field, or have a double linked list of users sorted by the start date of friendship.
- Guy January 29, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 0of 0 votes
AnswersDesign a job scheduler.
- shsf January 25, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 0 votes
AnswersDesign news aggregator like google news, without using pull, push or page crawl. Explain how are you going to scale it.
- shsf January 25, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 0 votes
AnswersDesign event system, that is receiving events from various client (iPad,mobile,browser) across the world. It is getting approx 1 billion events /day. At any point of time the PM comes and says , retrieve how many events occurred in last 60s and we should be able to retrieve that
- juny January 22, 2014 in United States for Traffic| Report Duplicate | Flag | PURGE
Ebay SDE-2 System Design - 1of 3 votes
AnswersHow would you synchronize a linked list across multiple computers. If nodes are added/removed to a linked list on one computer, all others must reflect this change. Concurrancy must be accounted for. (java)
- Guy January 22, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 0of 4 votes
AnswersDesign Short URL. (I am not sure what it even means)
- Guy January 18, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - -1of 1 vote
AnswersImplement classes for a website that can be used for building your own computer in object-oriented design manner. Eg: If a user selects a motherboard, it should filter out all the incompatible CPUs etc. You have to implement various classes that can be used for implementing this functionality. Java preferred.
- Guy January 15, 2014 in United States
Thanks a lot.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 0of 0 votes
AnswersWhat is a process? what is a service? what are the differences between a process and a service (e.g. in windows)?
- A.K. January 15, 2014 in United States for Shared file| Report Duplicate | Flag | PURGE
Citrix System Inc Software Engineer / Developer System Design - 0of 0 votes
AnswersDesign "YOU TUBE".
- iplayilearnkadugodi January 15, 2014 in India
Like how do you upload/where to do you upload/how do you fetch/ how millions of incoming requests will be addressed.
Also take care of things like how do you provide services.| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 2 votes
AnswersHow would you model the animal kingdom (with species and their behavior) as a class system?
- Guy January 08, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - -4of 6 votes
AnswersHow would you model the animal kingdom (with species and their behavior) as a class system? Java
- Guy January 08, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - -2of 4 votes
AnswersHow would you model the animal kingdom (with species and their behavior) as a class system?
- Guy January 07, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 0of 2 votes
AnswersDesign a Logging mechanism. Should be thread safe.
- R@M3$H.N January 07, 2014 in India
Initially i came up with Command Pattern, and write into a File. Was asked how i will synchronize multiple threads writing into Same File?
Later he gave hint about Aspect-oriented Programming(AOP). And also he gave a hint of Not always writing into the File, can also be a Mail,etc..| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Data Structures Problem Solving System Design Threads Unix - 0of 0 votes
AnswersDesign a Rubik's Cube, including backend database portion.
- asiamgenius December 27, 2013 in United States| Report Duplicate | Flag | PURGE
Google Intern System Design - 5of 5 votes
Answersdesign a system to return an unique ID for each request. For most of requests, the ID value should increase as time goes, the system should handle 1000 requests per second at least.
- codingfunnyguy December 04, 2013 in United States
timestamps alone is not valid since there might be multiple requests with same timestamps.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 25of 27 votes
AnswersGiven a large network of computers, each keeping log files of visited urls, find the top ten of the most visited urls.
- chandeepsingh85 September 26, 2013 in United States
(i.e. have many large <string (url) -> int (visits)> maps, calculate implicitly <string (url) -> int (sum of visits among all distributed maps), and get the top ten in the combined map)
The result list must be exact, and the maps are too large to transmit over the network (especially sending all of them to a central server or using MapReduce directly, is not allowed)| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 16of 16 votes
AnswersDesign a System Which contains multiple components, And all components are in same Assembly. All These Components are independent.
- csenasa August 10, 2013 in India
Design a Communication System such that:-
a. Sender is Not Aware of Reciever
b. Any New Component Addition Should Not Change the System Implementation.
( I Guess Interviewer also Not aware What he was asking ;) :P When he told sender is not aware if receiver hehehe)
2. Design a System to Handle Different Type of Objects
And Perform an Operation on the Sender Object.
a. Design to scale , it should handle huge number of Different kind of objects.| Report Duplicate | Flag | PURGE
Intuit Senior Software Development Engineer System Design - 0of 0 votes
AnswerDesign a Sudoko Game.
- csenasa August 10, 2013 in India| Report Duplicate | Flag | PURGE
Intuit Senior Software Development Engineer System Design - 1of 1 vote
AnswersDesign a air traffic control system
- Phoenix July 11, 2013 in United Kingdom for video| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 0of 0 votes
AnswersHow do you make sure an API does not leak memory?
- Romonov March 19, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 1of 1 vote
AnswerHow will you describe iOS manual memory management for a new developer in few words?
- peetonn March 09, 2013 in United States| Report Duplicate | Flag | PURGE
Facebook iOS Developer System Design - 3of 5 votes
AnswersI was asked to design a meeting scheduler, just like in the Microsoft outlook calendar or the gmail calendar. I proposed that I will create an array of 48 for each day. Every 30 min representing the array entry.
- Bevan March 01, 2013 in United States for AWS
I have to make sure that the next appointment does not collide with a previous meeting.
My solution works fine but it wastes too much memory.
Can anyone please tell me how do I find a better solution to detect collision for meetings.
I don't know all the meetings at the beginning. They will be added randomly later.
Thanks,| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 4of 4 votes
AnswersDescribe the actions performed by two functions:
- asafiniu February 27, 2013 in United States
Publish(user, msg) - publishes a new post on behalf of 'user'
GetNewsFeed(user) - gathers 30 posts from 'user's friends to show on his/her news feed.
I was asked to map out the relations required for holding large amounts of data.
As a followup, I had to calculate the number of machines facebook would have to initially buy to start off using this news feed.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer System Design - 1of 1 vote
AnswersYou have a bunch of files and folders, Design a playlist which can have any file from any folder and a player that plays it
- sublimedeveloper February 18, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 1of 1 vote
AnswersDesign a realtime service that tells users which of their friends are currently online.
Your service must implement two functions:// Return a list of friends of `user_id` that are online List<user_id> getOnlineFriends(user_id) // Tell the service that `user_id` is online setOnline(user_id)
You may assume that you have access to the function `getFriendIds(user_id)` which returns you a list of all friend ids for a given user id
- trunks7j February 15, 2013 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer System Design - 3of 3 votes
AnswersDesign a Restaurant Reservation system.
- learner January 09, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design System Design - 0of 0 votes
AnswersBuild an HTTP Library that is common and can be used by various clients like Twitter, Gmail, facebook etc. What features would you add into this library
- PAPA October 13, 2012 in United States| Report Duplicate | Flag | PURGE
Twitter System Design - 0of 0 votes
Answerssend data from client to server using netascii mode.
- a.bharthan September 15, 2012 in India
using UDP.
just implement the sendto() and recvfrom() blocks.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design