Top 22 System Design and Software Design Interview Questions and Problems
Tags: programming, coding, java, python
Published: 2020-03-20 15:21:54

---
title: Top 22 System Design and Software Design Interview Questions and Problems
published: true
description: Popular Software design interview questions for practice and crack your next Programming job interview. 
tags: programming, coding, java, python
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/725hr6u10emvitr8gwez.png
---
*Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.*

Hello guys, If you have given any coding interview then you know that System design or Software design problems are an important part of programming job interviews and if you want to do well, you must prepare this topic. In the past, when I shared my list of [programming interview questions](http://www.java67.com/2018/05/top-75-programming-interview-questions-answers.html), I have shared a couple of System design questions but my readers kept asking me for more questions, as it is a hard topic to master, and more and more practice is needed. 

I had my own list of questions that I have collected from various interviews with friends and colleagues but I needed more questions for this article when I stumbled upon the [**Grokking System Design Interview**](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224) course on Educative.

It's like a godsend resource because it not only gives you a lot of System design question but also provide all the knowledge and tools you need to solve those questions.

In other words, this course teaches you step by step how to proceed with designing a real-world system like Facebook, Twitter, Uber, etc. 

Actually, there are not too many system design interview courses. When I was searching I only find Grokking The System Design course by Educative and [**Preparing for the System Design Interview**](
https://click.linksynergy.com/deeplink?id=JVFxdTr9V80&mid=39197&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fpreparing-for-system-design-interviews%2F) course on Udemy by Rajat Mehta. Other than that I didn't find any online course which is completely focused on solving system design problems from top companies like Amazon, Google, Microsoft, Apple, SalesForce, Flipcart, etc. 

Anyway, When you combine this course with this list of questions you will have the best material to prepare for your System design interview. You can also first try all these questions by yourself before joining the course or looking it my solution for some of the questions.

Btw, this works best only if you have some Coding experience and fundamental knowledge of Computer Science and Software Design. If you are a complete beginner in this area then I would suggest you first start with a fundamental course to learn basics like [**Java Programming: Principles of Software Design**](https://coursera.pxf.io/c/3294490/1164545/14726?u=https%3A%2F%2Fwww.coursera.org%2Flearn%2Fjava-programming-design-principles) on Coursera or [Web Application & Software Architecture 101](https://www.educative.io/courses/web-application-software-architecture-101?affiliate_id=5073518643380224) on Educative itself. 

This course will not only teach you how to solve a real-world problem using Java with multiple classes but also software design which is not just coding but also involves logical thinking and design, which is very important for becoming a successful Software Developer.

## 22 System Design Interview Questions for Programmers
Without any further ado, here is the list of some of the most popular System design or Object-oriented analysis and design questions to crack any programming job interview.

**1\. How do you design the Vending Machine in Java?** ([solution](http://javarevisited.blogspot.sg/2016/06/design-vending-machine-in-java.html))\
You need to write code to implement a Vending machine that has a bunch of products like chocolates, candy, cold-drink and accept some coins like Nickle, Dime, Quarter, Cent, etc. Make sure you insert a coin, get a product back and get your chance back. Also, write the Unit test to demonstrate that these common use cases work.  If you get stuck you can read my two-part articles ([part1](http://javarevisited.blogspot.sg/2016/06/design-vending-machine-in-java.html#axzz4sZVwtCgs) and [part 2](http://javarevisited.blogspot.sg/2016/06/java-object-oriented-analysis-and-design-vending-machine-part-2.html)) about solving these classical system design questions.

**2\. How do you design a URL Shortening service like goo.gl or bit.ly?** [solution](https://www.educative.io/courses/grokking-the-system-design-interview/m2ygV4E81AR?affiliate_id=5073518643380224)
This one is another common System design questions. You have given a (typically) long URL, how would you design service that would generate a shorter and unique alias for it? If you are not familiar with URL shortener service have a look at some of the popular ones like goo.gl from Google and bit.ly which is used by Twitter.

Make sure to provide database schema and rationale behind some design decisions like how long you keep the data, how to get stats and analytics etc. If you get stuck, you can follow the solution given on [Grokking the System Design Interview](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224) course on Educative.

[![How do you design a URL Shortening service like goo.gl](https://dev-to-uploads.s3.amazonaws.com/i/8v4qc48b2owunxq1jc4f.png)](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224)

------

**3\. How do you design a traffic control system?**
A classical system design question from old age which is still popular. Make sure you know how to transition from one state to other e.g. RED to GREEN and from GREEN to ORANGE to RED etc.

**4\. How to design a limit order book?** ([solution](https://javarevisited.blogspot.sg/2017/03/2-practical-data-structure-algorithm-interview-questions-java.html))
A limit order book is used in stock exchanges to match a buy order with a sell order based on price and time priority. How would you go about that? Which data structure you will use? Remember, the speed of matching is key and also the reliability. If you need a refresher on Data Structure then you can check out [**Data Structure and Algorithm in Java**](https://click.linksynergy.com/deeplink?id=JVFxdTr9V80&mid=39197&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Flearn-data-structure-algorithms-with-java-interview%2F) course and If you feel stuck you can check out my solution here.

**5\. How do you design a website like Pastebin?**
Pastebin allows you to paste text or code and then share a link to that code anywhere you want. It's not an online code editor but you can use this to store any kind of text.

**6\. How would you create your own Instagram?** [solution](https://www.educative.io/courses/grokking-the-system-design-interview/m2yDVZnQ8lG?affiliate_id=5073518643380224)
Instagram is a photo-sharing application that provides some custom filters to enhance your photo quality. Your application should have photo upload functionality, tagging photos for search and some basic filters. If you could add share or social network that could be great. Btw, if you stuck, you can see the [free solution](https://www.educative.io/courses/grokking-the-system-design-interview/m2yDVZnQ8lG?affiliate_id=5073518643380224) provided on Educative's Grokking System design course as well. 

[![Instagram design problem interview](https://dev-to-uploads.s3.amazonaws.com/i/wx48at9cvasflzq6byax.png)](https://www.educative.io/courses/grokking-the-system-design-interview/m2yDVZnQ8lG?affiliate_id=5073518643380224)

------


**7\. How do you design a global file sharing and storage apps like Google Drive or Dropbox?**
These are used to store and share files, photos and other media. How do you go about designing things like allowing users to upload/view/search/share files or photos? track permissions for file sharing, and allow multiple users to edit the same document?

**8\. How do you design a chat application like WhatsApp or Facebook Messenger?** [Solution](https://bytebytego.com/courses/system-design-interview/design-a-chat-system?fpr=javarevisited)
You have surely used WhatsApp and Facebook, right? No? If not let me tell you that a chat application allows you to send messages to your friend. It's a point to point connection. You keep a friend list and see their status and chat them. 

In WhatsApp, you can also connect groups but that is for advanced and experienced developers. At a minimum, you should provide a design to keep a friend list and send and receive messages from them.

If you need guidance, you can also checkout this [**step by step solution of designing a chat system**](https://bytebytego.com/courses/system-design-interview/design-a-chat-system?fpr=javarevisited) with useful diagrams by Alex Yu as shown below:

[![How to design chat system like WhatsApp](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3mv4l0g0crgfsybektj.png)](https://bytebytego.com/courses/system-design-interview/design-a-chat-system?fpr=javarevisited)
 
And, if you like his tutorial, you can also get his [System Design Interview – An insider's guide](https://www.amazon.com/System-Design-Interview-insiders-Second/dp/B08CMF2CQF/?tag=javamysqlanta-20) book and his [System Design course](https://bytebytego.com?fpr=javarevisited), which has helped many people to crack system design interview. You can also use discount code Use code JALJAD to get 10% discount.


**9\. How do you design a Twitter Clone?**
Twitter is a popular messaging service lets you broadcast your messages to all your followers. You tweet and your followers see those messages, they can like or retweet. Make sure you implement common features like followers, hashtag, tweet, delete, etc. If you feel not going nowhere and stuck, you can follow the solution on [**System Design Interviews: Grokking the System Design Interview**](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224).


[![How to design a twitter clone](https://4.bp.blogspot.com/-MOVOuvuuUmo/Wv7a27ZlQ5I/AAAAAAAALaw/CDg29S0kv_wMgRH0z7WCRazAuAHvHpZyACLcBGAs/s640/design%2Ba%2Btwitter%2Bsearch%2Bor%2BFacebook%2BNewsFeed%2Balgorithm.png)](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224)

-----

**10\. How to design a global video streaming service like YouTube or NetFlix?**
While designing a video streaming service like NetFlix or YouTube key thing is smooth streaming and buffering and functioning over low bandwidth connection, how do you manage those challenges. If you need solution, you can also checkout Alex Wu's this [**step by step guide to design YouTube**](https://bytebytego.com/courses/system-design-interview/design-youtube?fpr=javarevisited), he has shared useful diagram to system design YouTube. 

Here is a nice flow diagram to explain video upload process:

[![how to design YouTube on System design inteview](https://blogger.googleusercontent.com/img/a/AVvXsEjjQwTRUU40Rk2JpXdqBl5JFE-bMNMGAdUQZpXzOsUPN6m2buD2G-ayzQyUSPW9-5gVWUAbZW92K3CE6FUp6Mhqj16vlSmvHgwBuqg9XYqL8t7UMSD-RPvTnSEzElS7e_1WtCHsGDpdLpu3_KI7BUTlqrIwsdRGgCCZQ91DTCUB50joTvxSGjkhCqqv=w480-h490)](https://bytebytego.com?fpr=javarevisited)

If you don't know Alex is one of the best System design instructor and author and his book [System Design Interview – An insider's guide](https://www.amazon.com/System-Design-Interview-insiders-Second/dp/B08CMF2CQF/?tag=javamysqlanta-20) is one of the best book for System Design Interview preparation.


**11\. How to design an ATM machine?**
An ATM machine allows a user to deposit and withdraw cash. It also allows a user to see his balance. How do you design such a system? What are your main challenges?

12\. How do you design an API Rate Limiter?

13\. How do you design Twitter Search?

**14\. How to design a Web Crawler like Google?**
A Web Crawler goes to a website and crawl all link and index them e.g. Google so that they can later appear in a search result. A Crawler can also use for searching a particular file in a set of directories, how do you design such things? What are the main challenges?

**15\. How to design Facebook's Newsfeed? What kind of Algorithm will you use?**
The newsfeed is an important part of Facebook which allows a user to see what's happening around his world which includes friends and families, the pages he has liked, the group he has followed and of-course the Facebook Ads.

The job of the Newsfeed algorithm is to show messages which are most important for the user and which can generate high engagement. Obviously, messages from friends and family should take priority.   If you feel not going anywhere and stuck, you can follow the solution on [**System Design Interviews: Grokking the System Design Interview**](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224).

[![Top 20 System Design Interview Questions for Java Programmers](https://4.bp.blogspot.com/-5yPUxCgJljw/Wv7bK1_Jl9I/AAAAAAAALa4/i15dRaTMpTIdusPRBpOyuF1KSs8T6PiIACLcBGAs/s400/Grokking%2Bthe%2BSystem%2Bdesign%2Binterview%2Bquestions%2BCourse%2B2.jpg)](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14537&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fcoding-interview-bootcamp-algorithms-and-data-structure%2F%3FsiteID%3DJVFxdTr9V80-rXpRziutlS8vhaQ7R2Mt.w%2526LSNPUBID%3DJVFxdTr9V80)

**16\. How to design Yelp or Nearby Friends?**
Here is a nice video from Alex Yu, author of [System Design Interview – An insider's guide](https://bytebytego.com?fpr=javarevisited) book and course on YouTube where he explains how to efficiently design a system to find the best restaurants nearby on Yelp or find k-nearest gas stations on Google Maps.

https://www.youtube.com/watch?v=M4lR_Va97cQ


**17\. How to design a global ride-hailing service like Uber, Grab, or Ola backend?**
Uber and Ola are two of the most popular ride-hailing services, it brings both drivers and passengers together. How do you go about designing to allow a passenger to see nearby taxis and book them?

**18\. How to design BookMyShow?**
A website which allows you to book cinema and event ticket. This is actually an Indian startup which is doing well. 

**19\. How to design a social network + message board service sites like Quora, Reddit, or HackerNews?**
Reddit, Quora, and HackerNews are some of the most popular social network sites where users can post questions or share links. Other users can answer questions or comment on the shared links.

**20\. How do you design an application like Airbnb?**
It allows some users to upload rooms for rent and other users to rent them. Some of the features are only available to admins, publishers, and subscribers.

**21\. How do you design an Elevator of Lift system?**
We All know about Elevators and Lift as most of us use it. You might have seen them in pair and in some big office building you can see 3 to 4 lifts. You need to design software for that so that it can reach use quickly on different level. You can assume you have two lifts and a 10 floor building. 

**22. How do you design a Trade Position aggregator in Java? [solution](https://javarevisited.blogspot.com/2022/03/how-to-design-trade-position-calculator.html)
You need to design a system which will get live trade feed and calculate position for clients. 

Here are some rules you need to remember while building this software:
1. When Trade is Buy and operation is NEW or AMEND, you need to increase the position as your exposure increases. 
2.  When Trade is Sell and operation is CANCEL, you need to increase the position as your exposure is not reducing. 
3.  When Trade is Buy and operation is Cancel reduce position;
4. When trade is Sell, and operation is NEW or AMEND, reduce positions. 

[![System design questions for Java interviews](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cvyy6o261lvb663aeht.png)](https://www.java67.com/2018/05/top-20-system-design-interview-questions-answers-programming.html)
 

That's all about some of the **frequently asked System Design Interview Questions for Java Programmers**. Btw, these questions are not just useful for Java Programmers but also for [Python](https://hackernoon.com/top-5-courses-to-learn-python-in-2020-best-of-lot-bdq3y42), [C++](https://dev.to/javinpaul/top-10-courses-to-learn-c-in-depth-best-of-lot-1k7), [Java](https://medium.com/javarevisited/top-5-java-online-courses-for-beginners-best-of-lot-1e1e240a758), and [Ruby](https://www.java67.com/2018/02/5-free-ruby-and-rails-courses-to-learn-online.html) Programmers. These questions are actually independent of programming language and test your software design and architecture skill.

**Further Reading**
1. [Grokking System Design Interview on Educative](https://www.educative.io/collection/5668639101419520/5649050225344512?affiliate_id=5073518643380224)
2. [Java Programming: Principles of Software Design](https://coursera.pxf.io/c/3294490/1164545/14726?u=https%3A%2F%2Fwww.coursera.org%2Flearn%2Fjava-programming-design-principles)
3. [Mastering the System Design Interview by Ex Amazon Hiring Manager](https://click.linksynergy.com/deeplink?id=JVFxdTr9V80&mid=39197&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fsystem-design-interview-prep%2F)
4. [The System Design Primer on Github](https://github.com/donnemartin/system-design-primer/blob/master/README.md)
5. [Web Application & Software Architecture 101](https://www.educative.io/courses/web-application-software-architecture-101?affiliate_id=5073518643380224)
6. [System Design Interview – An insider's guide by Alex Xu](https://bytebytego.com?fpr=javarevisited)

Other **System Design and Software Architecture tutorials** you may like
-   My favorite courses to learn Software Architecture ([courses](https://medium.com/javarevisited/top-5-courses-to-learn-software-architecture-in-2020-best-of-lot-5d34ebc52e9))
-   5 Free Courses to learn Object Oriented Programming ([courses](http://www.java67.com/2018/02/5-free-object-oriented-programming-online-courses.html))
-   Difference between Factory and Dependency Injection Pattern? ([answer](https://javarevisited.blogspot.com/2015/06/difference-between-dependency-injection.html))
-   Top 5 Courses to learn Microservices in Java with Spring ([courses](https://medium.com/javarevisited/top-5-courses-to-learn-microservices-in-java-and-spring-framework-e9fed1ba804d?))
-   How to create thread-safe Singleton in Java? ([example](http://javarevisited.blogspot.sg/2012/12/how-to-create-thread-safe-singleton-in-java-example.html))
-   How to implement the Strategy Design Pattern in Java? ([example](https://javarevisited.blogspot.com/2015/07/strategy-design-pattern-and-open-closed-principle-java-example.html))
-   Difference between Factory and AbstractFactory Pattern? ([example](http://javarevisited.blogspot.sg/2012/12/how-to-create-thread-safe-singleton-in-java-example.html#axzz5EAUtcsud))
-   18 Java Design Pattern Interview Questions with Answers ([list](http://www.java67.com/2012/09/top-10-java-design-pattern-interview-question-answer.html))
-   Difference between State and Strategy Design Pattern in Java? ([answer](http://javarevisited.blogspot.sg/2014/04/difference-between-state-and-strategy-design-pattern-java.html))
-   Top 5 Courses to learn Design Patterns in Java ([courses](https://javarevisited.blogspot.com/2018/02/top-5-java-design-pattern-courses-for-developers.html))
-   5 Free Courses to learn Data Structure and Algorithms ([courses](https://javarevisited.blogspot.com/2018/01/top-5-free-data-structure-and-algorithm-courses-java--c-programmers.html))
-   Top 5 Courses to learn Software Design and Architecture ([dev.to](https://dev.to/javinpaul/5-best-courses-to-learn-software-architecture-and-system-design-for-programmers-1879))

Thanks for reading this article so far. If you like these design pattern interview questions then please share with your friends and colleagues. If you have any questions or feedback then please drop a note.

**P.S.-** If you are looking for some free courses to learn Design Pattern and Software Architecture, I also suggest you check out the **[Java Design Patterns and Architecture](http://bit.ly/java-design-patterns-tutorial)** course by John Purcell on Udemy. It's completely free, all you need to do is create an Udemy account to access this course.