design Interview Questions
- 0of 0 votes
AnswersForum Post0 AnswersATM Currency Dispenser
- djvirus March 24, 2022 in India
Design and implement the ATM cash dispenser. User will request for some amount and you have to return the currency note and its count.
Example1: You have the following notes in ATM
2000-1, 500-5,200-4 and 100 - 4
Input - 1700
Output: 500-3,200-1
1: You have the following notes in ATM
2000-1, 500-1,200-4 and 100 - 0
Input - 600
Output:200-3| Report Duplicate | Flag | PURGE
Microsoft Java Experienced design - 0of 0 votes
AnswersCome up with a low-level design for an In-Memory Database.
- zapper.ethan March 19, 2021 in United States| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer design - 1of 1 vote
Answersdesign an ip blocking system
- nitinthakur5654 March 05, 2021 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswersDesign a low level design and db schema for railway reservation system for supporting following 2 features -
- neer.1304 June 01, 2020 in United States
1) User would give source city, destination city and date as input and would get the list of trains matching the criteria.
2) On selection of a train from the list user should be able to see the schedule of the train including the arrival time, departure time and station name.| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer design - 0of 0 votes
AnswersTPM interview question. In this tech company, backend engineers quickly develop/ prototype and test new features with live data on the server by some framework, how do you extend a similar framework to mobile app developers as well to use such prototype features and validate with live data. It was a very abstract question. To me it sounded more like sandbox testing. The key requirement was to on the fly develop new features and test with live data. I spoke about prototyping engines, sdk for the backend service to be integrated to the mobile apps, and these apps could use the same canary rollout data or a backup of live data. There wasn't a definitive answer more of a thought process question. I mentioned nuances in mobile app context like less resources, pagination requirement etc. Appreciate if some one has been asked or familiar with a similar question and any responses are appreciated.
- tekky May 27, 2020 in United States| Report Duplicate | Flag | PURGE
design - 0of 0 votes
AnswersQuestion: TPM interview question. In this big tech company, backend engineers quickly develop/ prototype and test new features with live data on the server by some framework, how do you extend a similar framework to mobile app developers as well to use such prototype features and validate with live data. It was a very abstract question. To me it sounded more like sandbox testing. The key requirement was to on the fly develop new features and test with live data. I spoke about prototyping engines, sdk for the backend service to be integrated to the mobile apps, and these apps could use the same canary rollout data or a backup of live data. There wasn't a definitive answer more of a thought process question. I mentioned nuances in mobile app context like less resources, pagination requirement etc. Appreciate if some one has been asked or familiar with a similar question and any responses are appreciated.
- tekky May 26, 2020 in United States| Report Duplicate | Flag | PURGE
Tech leader Program Manager design - 0of 0 votes
AnswersFind 'k' largest element in stream of integers.
- neer.1304 July 01, 2019 in United States
Constraints -
1) k can vary for every query
2) Stream can not be stored| Report Duplicate | Flag | PURGE
Visa Staff Engineer design - 0of 0 votes
AnswersGiven customer Geo Location(Lat-Long) and List of Restaurants. Each restaurant consist of :
- neer.1304 May 31, 2019 in United States
- Lat long of restaurant
- Name
- List of Items, where each item has
- Item Name
- Prep Time
- Sensitivity ( Low, Medium, High). Lower sensitive items like Icecream cannot be delivered more than 2 KM.
- Find out List of Restaurant Given Customer and Cart is Empty
- Find out SLA(Time to deliver) given cart, restaurant and Cutomer
- Parameters should be Configurable like Sensitivity, Max prep time etc| Report Duplicate | Flag | PURGE
Swiggy SDE-3 design - 0of 0 votes
AnswersUse the location data getting generated from multiple delivery boys moving on the ground to estimate time which a delivery boy will take to move from point A to point B in an area. Additionally, try to do this in real time so that it can be used in assigning delivery boys and minimising delivery time in real time.
- neer.1304 May 31, 2019 in India| Report Duplicate | Flag | PURGE
Swiggy SDE-2 design - 0of 0 votes
AnswersDesign subscription based sports website which can display scores, game status, history for any games hld and lld
- neer.1304 April 06, 2019 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 design - 0of 0 votes
AnswersDesign an airport service that will be used to allocate a free runway when the plane is about to land. Data structure for the same. What if the runway is not available? Message passing between control centre and the plane. Focus on low-level design and code. Can the same runway be alloted to two different planes (locking)? Database storage needed?
- neer.1304 April 06, 2019 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 design - 0of 0 votes
Answersdesign an email job that would deliver high number of emails and will work on a really old and slow hardware.
- Rx100 August 07, 2018 in United States| Report Duplicate | Flag | PURGE
Software Engineer design - 0of 0 votes
Answershow to design a system to fast lookup cars on the market according to the user's geo position.
- Rx100 August 07, 2018 in United States| Report Duplicate | Flag | PURGE
Software Engineer design - 0of 0 votes
AnswersDesign Instagram like app end to end
- androidenthusiast March 12, 2018 in United States| Report Duplicate | Flag | PURGE
Facebook Android Engineer design - 0of 0 votes
AnswerI have applied for Software Engineer at a startup company in India, I have asked the following question.
- s.lokesh1729 December 04, 2017 in India for Engineering
You are building an application with ORM model say django, you have set of models, urls. Let's say an user is hitting api /user/account/profile/xxx/yyy like this. You have to check whether user has permission to access or not. If user has access to /user/ then he has access to the whole URL, like wise if he has access to /user/account/ he has access to whole URL. User table looks like below and it has a field called prefix which contains URL prefix of that particular user.
Users
userid | prefix | username | firstname | lastname
1 /user/ lokesh1729 lokesh sanapalli
2 /user/account lokesh1729 lokesh sanapalli
What is the most efficient way to check if a particular user has access to an API or not???
I gave a brute-force approach that first we will check if he has access to /user/ then /user/account then /user/account/profile and so on, if he has access to a prefix and we will process the request.
He is not satisfied with the answer. Can anyone tell me what might be the answer for this???| Report Duplicate | Flag | PURGE
unknown Software Engineer design - 0of 0 votes
AnswersDesign a geographically partitioned multi-player card game, that supports multiple players, multiple games at a time.
- neer.1304 August 31, 2017 in United States
Each game will have one contractor like ones we have in a bar, He can play a game or just watch it. Integrate payment systems.
First HLD was required, use cases, flow diagram. then a low level design was required all necessary classes where will you use polymorphism, where inheritance, multithreading, synchronised approach if needed, socket connections| Report Duplicate | Flag | PURGE
Amazon SDE-3 design - 2of 2 votes
AnswersDesign a Netflix type system. Start from HLD to LLD.
- neer.1304 August 31, 2017 in United States
Consider requirements like search, video serving, authentication, security, serving multi quality video.| Report Duplicate | Flag | PURGE
Amazon SDE-3 design - 1of 1 vote
AnswersDesign Truecaller. Both HLD and LLD.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswerDesign entity(model) structure of a file systems. You don't have to write any interfaces, just various models and their properties.
- sonesh May 11, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswersYou have to desing a system for a shop kepper to keep his/her inventory managed. He/she have furniture at the begining, but he may add more items to it. His/her furnitures are wood char, wood table, steel chair, etc.
- sonesh May 11, 2017 in United States
Each furniture have one property, a boolean one, called isChildSafe.
Later, he said, what if the shopkeeper wants to add new type of items, such as phone or may be something else, and he/she might also wants to add two new properties, such as isFireSafe, isWaterSafe etc.
How would you design extend to these types.| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswersYou have to design a job scheduler. The job schedular should be able to accept all kind of jobs, small or long running. Multiple systems might be adding jobs to it and multiple systems should be able to execute jobs simultaneously.
- sonesh May 11, 2017 in United States
Please list down the components and data flows between them, what kind of interfaces you will be having, what kind of retry logic you will be providing, storage and middle tier design was also asked.| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswerDesign/Implement an LRU cache so that Read/Write/Find operation only takes constant time.
- sonesh May 11, 2017 in United States
Now, Let's say, we will be considering the frequency as well. It means to keep the most used processes and in a case of the tie, use lease recently used to remove an element.
Now, as this new algorithm can cause many hits, or no new process will come to the cache if the last process of the cache has two hits., What can you do to prevent this, and how would you implement that.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm design - 2of 2 votes
AnswersApple On-site at Cupertino
- aonecoding May 10, 2017 in United States
Team Data Warehousing
Questions on Hadoop, Hive and Spark
I. Given a table with 1B of user ID and product IDs that the users bought, and another table with product ID mapped with product name. We are trying to find the paired products that are often purchased together by the same user, such as wine and bottle opener, chips and beer … How to find the top 100 of these co-existed pairs of products. If going with hadoop, where is the bottleneck and how to optimize?
II. Someone put distribute Random()*ID in a Hive script to prevent data skew. What would be the problem here?| Report Duplicate | Flag | PURGE
Apple SDE-3 design - 0of 0 votes
AnswersYou are given following design architecture.
[DB] <==> [Server]
Now let's say user are complaining about our server being slow, how would you figure out where is the problem?
- sonesh May 08, 2017 in United States
2) now let's say the problem is in server, where do you think the problem is in server?
3) What if you found our server is fast, how about now?
4) you have also found that the network call from server to DB is also fast, how about now?
5) Lets say, our server is also setting near the complaining user, how about now?| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer design - 0of 0 votes
AnswersDefine Reverse Polish notation calculator. Interviewer needed class design for the calculator. Please make sure that adding extra operator tomorrow should not make us change the class or any of its methods.
- sonesh May 08, 2017 in United States| Report Duplicate | Flag | PURGE
Two Sigma Software Engineer / Developer design - 0of 0 votes
Answers1) write a concurrent singleton class.
- sonesh May 08, 2017 in United States
2) Write a factory method class, and how it is used
3) Define a sealed class.
4) What if we want to replace sealed class with another class and use this new class where ever we have used our sealed class, how do you do that.
5) What would you look in a code review?
6) Do you know about adapters, bridges design pattern
7) Define async await method, how do we read data in task library
8) What are the other methods of making your call multi-threaded
9) Do you know Linq queries
10) How to make defer/no defer execution in Linq Queries.
11) Where do you use singleton class, give at least three examples
12) When we use singleton class and when static, both have the single instance.| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer design - 1of 1 vote
AnswerDesign an electronic voting system for india , design its schema , scaling its working, failure conditions & optimization
- Harsh Bhardwaj April 20, 2017 in India| Report Duplicate | Flag | PURGE
AppPerfect Software Engineer design - 0of 0 votes
AnswersDesign for a call center Data.
- DuttaJ March 23, 2017 in India
Example: A call center has Huge number of unique callers, calling anytime in a day and talking for various amount of duration.
1. Data base design.
2. Utility code to query Unique users history for a given year.
3. Draw a time series graph for the unique users 1 years behavior.| Report Duplicate | Flag | PURGE
Concur Technical Architect design - 0of 0 votes
AnswerDesign and write algo for a bowling game wherein multiple games could be played in parallel and the scores to be shown for each game.
- neer.1304 January 20, 2017 in United States
Detailed question
Design the entire bowling alley system. One bowling game will be played by multiple players on a single lane.
During the game,players and their scores will be maintained and shown by the system and winner will be declared at the end of the game.
Likewise multiple games can be played in parallel on multiple free lanes.
Some rules about bowling:
A game consists of ten sets
In each set,the player has two opportunities to knock down ten pins.
The score for a set is the total number of pins knocked down,plus bonuses for strikes and spares.
A spare is when the player knocks down all ten pins in two tries.If there is spare the player gets 5 bonus points.
A strike is when the player knocks down all ten pins on his/her first try.If there is a strike the player gets 10 bonus points.
In the final set a player who rolls a spare or a strike is allowed to roll the extra balls to complete the set.However only a maximum of three balls can be rolled in the final set.| Report Duplicate | Flag | PURGE
Ola Cabs SDE-3 design - 1of 1 vote
AnswersGiven two big files merge the files on to a third file such that the lines interleave.
- santakdalai90 December 20, 2016 in India| Report Duplicate | Flag | PURGE
EFI Software Engineer design