Software Design Interview Questions
- 0of 0 votes
AnswerAs you know, every OS comes up with this tiny application called the calculator. It is good. Now, here is our problem. If we try to implement the function
def calculate( operand, operator, operand ) { /* Do Interviewers bidding here */ }
I have to write if upon if upon if upon if to do for all operators. Moreover, some operators are not even binary! Take example the abs() or say the negate()!
- NoOne October 14, 2016 in India
Bigger problem persists. With the if mode, we can not even add operators as we wish to without changing code!
But that is a sin. So, what do we do? That is question 1.
In question 2, as a software tester, how do you propose to test and automate the above? Writing more if than the developer is not allowed.| Report Duplicate | Flag | PURGE
SDET Algorithm Data Structures Object Oriented Design Programming Skills Software Design - 0of 0 votes
Answerwhat would be the best way to reduce the size of image in E-commerce website having billions of images ?
- namrata.rohit22 September 13, 2016 in United States| Report Duplicate | Flag | PURGE
Developer Program Engineer Software Design - 0of 0 votes
AnswersE-commerse website having billions of items with image .What would be the best way to reduce the size of image ?will you use an API or do with HTML or use Hadoop or use simple bash script
- namrata.rohit22 September 13, 2016 in United States| Report Duplicate | Flag | PURGE
Java Developer Software Design - 0of 0 votes
AnswersBuild an in-memory DB that supports many commands and transactions.
- adch123 May 25, 2016 in United States
Similar to redis database (Redis.io)| Report Duplicate | Flag | PURGE
Database Java Object Oriented Design Software Design - 0of 0 votes
AnswersDesign and Implement: Producers and Consumer Problem. Producers produce different kind of messages and Consumers register themselves for different kind of messages. Need to design and implement Producer, Consumer and a Delegator which is responsible for storing and delivering the messages to appropriate listeners.
- neer.1304 May 12, 2016 in United States
Changed the question to handle millions of messages.
Changed the question to handle different priority messages.
Threading model for Producer, Listener and Delegator.
In the end he asked me to code 2 methods of Delegator.
1: which adds the message from Producer to its internal queue.
2: Delegate, which delivers the message to appropriate listener.| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Software Design - 0of 0 votes
AnswerDesign a Twitter feeds API. How would you actually connect it from a mobile? What happens behind the Twitter network? how do the Trends get published? From where does Twitter get the information for a particular trend(Eg: #Obama, #nfl) and publish it out? What protocol does it use? How do you connect to Twitter API? How does Twitter handle multiple connections?
- xankar May 10, 2016 in United States| Report Duplicate | Flag | PURGE
Uber Software Developer Software Design - 0of 0 votes
AnswerGiven start time and end time of parking (below is the table of price rule). Come up with data structure you can store these price rules
- neer.1304 March 06, 2016 in United States
Price Rules:
On Weekday On Weekend
Hours Price Hours Price
0 – 2 $5 0 – 2 $8
2 – 6 $10 2 – 6 $13
6 – 12 $15 6 – 12 $18
12 – 24 $20 12 – 24 $25
Design an architecture for the system which shows parking spaces available near customer's location in a mobile app.| Report Duplicate | Flag | PURGE
Amazon SDE-3 Software Design - 1of 1 vote
Answersthere is a news publishing/subscribing product of Amazon where electronic contents are collected from owners like newspaper, magazines. Customer is using kindle. Design how customer will get the content when his system kindle connects to net. how to send the contents to device?
- mohapatrasandeep60 January 09, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 1of 1 vote
AnswersDesign a restaurant reservation system - You need to design everything from scratch - Identify actors in the system, identify what all data should be stored in persistence storage (and why). How would you make your design scalable?
- Abhigyan Mehra November 25, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 1of 1 vote
AnswersDesign a locking mechanism for a distributed system .
- Ray November 21, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Software Design - 0of 0 votes
AnswersDesign a train system which suggests shortest path and transfer needed to reach from source to destination. What can be the optimization.
- hm September 30, 2015 in United States
For example:
A system may have 10 trains from t1 to t10.
There are total 100 stops in the system s1 to s100.
Each train has fixed set of stops. You could allow to change and transfer train of source and destination does not cover using just 1 train.
What all can be APIs, data structure, optimizations scalable option.| Report Duplicate | Flag | PURGE
Software Engineer Algorithm Problem Solving Software Design System Design Trees and Graphs design - 3of 3 votes
AnswersDesign Live comments. If your facebook.com homepage is open with bunch of feeds and if someone comments on those feeds, the comments should automatically show up in facebook.com home page without refreshing the page. Feeds could be a simple status update by a friend, post in a group, post by a person you're following, post in a page you've liked etc.
- Rejected September 29, 2015 in United States
Few things what they are looking for -
1. How do you solve it initially and how do you scale it?
2. How do you scale push model in-case if you choose PUSH model to solve it?
3. If push cannot scale how do you solve it?
4. How pull model solves it?
5. When will you use push vs pull?| Report Duplicate | Flag | PURGE
Facebook Software Developer Software Design - 1of 1 vote
AnswerHow would you design a price tracking website like camelcamelcamel.com?
- jb August 07, 2015 in United States
For example, we might want the following behavior. Input: Item URL and target price. Result: if the item goes below the target price, then users tracking the item will get an email alert.
Consider the following topics in the answer: database design (SQL or NoSQL), automated price checking mechanism, price scraping or price API, caching data.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersSuppose you want to design a application which will be receiving thousands of requests from many clients. And Application need to update received infomration to different servers in real time. What mechanism will you use?
- Sach July 20, 2015 in India
For ex. Your application receives thousands of requests shares values along with exchange name from different client and application need pass it to different exchange servers ex. Mumbai Exchange, NSE and few more.
Application need to pass information to specific servers in real time.
Here is sample data your application will receive in fraction of seconds from mutiple clients.
110 share1 BOMEXCHG
222 share2 BOMEXCHG
5677 share3 NSE
5690 share3 BOMEXCHG
:
:
:| Report Duplicate | Flag | PURGE
GSLab Technical Architect Software Design - 0of 0 votes
AnswersThere is Ticketing vending machine which accepts Rs.1, Rs.2 and Rs. 5 coins. There is Rs. 5 Ticket. System will reject all invalid coins for ex. Rs 0.50, Rs. 0.25, Rs 10.
- Sach July 20, 2015 in India
System will not return any money or ticket if coin is invalid.| Report Duplicate | Flag | PURGE
Hewlett Packard Tech Lead Software Design - 0of 0 votes
AnswersDesign a your own Youtube. Which has feature like play, pause, resume, stop. Note that,
- Sach July 20, 2015 in India
- multiple users can be access multiple videos.
- Mutiple users can access same video at same time or different time.
- Need to tackle performance bottoleneck.| Report Duplicate | Flag | PURGE
Hewlett Packard Tech Lead Software Design - 0of 0 votes
AnswersThis interview was held 3 years back. adding this question for others reference.
- Sach July 20, 2015 in India
Design a picasa.i.e. A photo album application where user can store his pictures and share among the others using their email ids.
You need provide high level design for server and client.
I explained about
- storage on RDBMS database ( Interviewer was expecting some datwarehousing or NOSql over here but I could not explain as was not aware of it till that time)
- Different sizes of photo storage.
- Cache for recently accessed photos
- Cache for most accessed photos
- Regional servers
- Disaster management, clustering, HA| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersRound 6
- sonesh July 12, 2015 in United States
Question 2 : VRBO(Vacation Rentals by Owner), is a portal for real state where owners can rent their properties, renters can occupy them for sort duration by giving rent to the owner via VRBO. Lets start by thinking how you can design such system. ?, What are the complexities you have address here ?, both business and technical ?, what will be your main focus ?, tell me about the architecture of the system ?
Note that he wasn't concern about finer implementation details, but looking for broader things and thoughts.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Storming Software Design System Design Terminology & Trivia - 0of 0 votes
AnswersRound 2
- sonesh July 02, 2015 in United States
Question 1: Design a traffic signalling system for a city.
1.a : think as you were asked this question in a high level meeting with leadership teams, what would you do at that time ?
1.b : what are the check-list/to-do you will do before start of your project.
1.c : how will you go over each and every check-list/to-do
1.d : Once you have done all this, what are the design principle you will follow.
1.e : what kind of system you would choose(I gave distributed/centralized)
1.f : Tell me the pros and cons of these type which you have listed
1.g : how do you go over your goal.
1.h : how will you make the cons go away from one system which out changing it to another type(like possible modification).
1.i : How will to achieve your goal which was given to you by LT team.
1.f : Now lets write the code for a road intersection, make it generic enough both in terms of colors, and ordering, so what it can be used anywhere.
Note that : a road intersection may have many traffic lights one for each side of the roads| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Coding Data Structures Software Design System Design - 0of 0 votes
AnswersLet's say I am setting up my company and it has three buildings(B1,B2,B3). The company has both permanent employees and contractors. Permanent employees can access all the buildings and contractors will have access only to building B3. How do you get started with the design?
- 52900834 June 26, 2015 in India| Report Duplicate | Flag | PURGE
TRG Technical Architect Software Design - 0of 0 votes
AnswerDesign the "what other people bought feature." This was focused on database design/creating an api to lie on top of it, and he asked questions to see if I understood how dbs actually work(like what does group by do). I was given an example table with the schema of like
- steez June 22, 2015 in United States for android amazon app, social shopping
itemID, purchaseDate, customerID
He asked big O complexity of sql query as well.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign Amazon Questions and Answers. This question was to see how I code, and how I would modularize things. He wanted me to code every single thing as realistically as possible on a whiteboard.
- steez June 22, 2015 in United States for android amazon app, social shopping| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign a push notification system for android. Assume that we have 1 million users this year, but next year we will have 15 million. Assume that Google can handle infinite notifications per second.
- steez June 22, 2015 in United States for android amazon app, social shopping
I would love to see this answered, as I did not answer it well.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 18of 18 votes
AnswersDesign an Email sender, need to send 100,000000 emails and you have 5 machines how could you do it efficiently.
- shaileshagarwal1 June 15, 2015 in India for Transportation Team| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswerGiven an URL you need to analyze all the images( they may be in 1000’s of number) and return the cumulative quality of images present in that url.
- shaileshagarwal1 June 15, 2015 in India for Transportation Team
lets say: you can configure image quality as very good, good, average, poor..etc, so you have to return one value among them.The given URL may contain several other URLs and they also contain lot of images . you need to consider all of them. lot of questions like how to avoid visiting same url again,
how would you determine the quality of an image if you encounter an url that contains only an image..etc.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign Elevator system. And then write an algorithm for that Design such that, the user request should be completed in logN time in a N story building with M elevators.
- shaileshagarwal1 June 15, 2015 in India for Transportation Team| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswerIn an online teaching system, there are n number of teachers and each one teaches only one subject to any number of students.
- shaileshagarwal1 June 15, 2015 in India for Transportation Team
And a student can join to any number of teachers to learn those subjects.
And each student can give one preference through which he can get updates about the subject or class timings etc.
Those preferences can be through SMS or twitter/facebook or email..etc.
Design above system and draw the diagram for above.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign Bing search.
- Tom Walker June 07, 2015 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Developer Algorithm Coding Database Java Object Oriented Design Software Design - 0of 0 votes
AnswersHow would you implement map with hexagon tiles? Also define how you would a unit move from one tile to the next.
- Jack Le Hamster May 11, 2015 in United States| Report Duplicate | Flag | PURGE
Dobuki Studio Game Programmer Software Design