System Design Interview Question: Parking Lot | Low Level Design | Design Principles | LLD | FAANG

preview_player
Показать описание
Parking lot is a very common questions asked in system design interviews. Its asked in both high level as well as low level system design. But it's a lot more popular for low level system design interviews.

I also solved this problem for one of my recent interviews and thus I thought of sharing my solution. I think it can help others who are also preparing for such interviews.

In this video, I am discussing following:
00:00 Introduction
00:27 Problem statement
06:48 Complete solution for parking lot design
15:40 Model classes for parking lot design
28:40 Live improving a piece of code
34:40 Why this design was created? Benefits of this design
40:40 Using composition over inheritance
41:35 Code repository
41:52 Further enhancements that can be done.

Thanks for watching. Hope you find this video helpful. Let me know your feedback in the comments.

Do subscribe to the channel!!

Multi-threading Cohort:

You can follow me on:

#system #design #interviews #interview #coding #programming #faang #tech #technology #developer #coder #code #java #python #go #systemdesign #architecture #software #partitioning #sde #sdi #systemdesigninterview #software #development #program
Рекомендации по теме
Комментарии
Автор

Please watch it completely so that you get the complete solution of the problem. I discussed many things like my approach, limitations, further enhancements, design choices, etc.

anomaly
Автор

My Two Cents.

Awesome tutorial, goes without saying Udit's LLD playlist is really good.
In an actual (80mins) interview, coming up with the above solution is really difficult.

This is how I approached it.
1. First without seeing the video, try to code it yourself (90 mins).
2. Focus on the main parts first - create parking lot, park, unpark first. (if time permits, focus on other features).
3. Try to do draw a small uml diagram, list the entities and the relationship.
4. now try to build the logic for the above 3 features.
5. In case you have multiple vehicles - car, bike, truck (use Factory design pattern easy to implement).
6. for parking lot creation use singleton as well.
**** it's good if you can get till here **
7. Use Treeset for making sure the ordering works. (do check its complexity though).
8. Finally bonus, see if you can handle threading here.

In all of my interviews, till 6 have given me a hire rating.

RahulVerma-fzjf
Автор

This stuff is GOLD!! It is good that you have the code beforehand so that you can show us the end-to-end design; I also love that you talk about the SOLID prinicples, and what is being followed and what can be improved. Really awesome content, keep sharing!!

garimadhanania
Автор

It's hard to find good content on low level design. Thanks for sharing, I learnt a lot from this. I think your presentation style is perfect, it's a good detailed breakdown of everything.

saurabhmaurya
Автор

Awesome tutorial, I suggest increasing the font size in the IDE for future videos. Keep going, Udit!!

sanjayulsha
Автор

Thank you for the video. The explanation and reasoning behind the work were exceptionally clear. You covered why we are doing things this way, the benefits of this approach, potential pitfalls of other methods, and the design principles and patterns we are following. This detailed explanation is crucial for beginners to understand. Often, entry-level software engineers perform tasks without understanding the underlying reasons. Your thorough explanations will help them grasp the concepts behind their actions. Thank you for this excellent tutorial!

ashiquddinpranto
Автор

Thank you for the Great Video. Only one request is that please mentioned the Design pattern and design principle name also while walkthrough the project. It will be more helpful.

miteshjain
Автор

One of the best channels I've found for LLD. Thanks a lot and please keep up the awesome work!

vishnusingh
Автор

Lucky to have found this channel for LLD preparation. Clear, precise and yet detailed explanation. Great job Udit !

shubhamsrivastava
Автор

Your channel and work is highly underrated, High class production content from your side, Hat's off to your patience and commitment

saivasanth
Автор

Great video, this is what strucutured and flexible solutionlooks like . no body shown us with this much detailing.
please make series on LLD sir. these will help is make our OOP concepts strong also help us with interview also.

AkashJadhavIT
Автор

Udit bhaiya I read a post where you expressed that you were disappointed with some people disliking the video. Kindly don't pay heed to those people and keep doing the good work. From now on I will always make sure that I will press the like button for all your videos.

MohitGupta-pvfd
Автор

One more enhancement can be having multithreaded parking lot. Assuming we have a huge parking lot with multiple entry & exit points, there can be freeSlot/assignSlot operation happening simultaneously.

vipulsingh
Автор

Improvements or additional features:
1. Adding floors in parking lot. Giving preference to closest floor.
2. Adding slot types: small, medium and large.
3. Multiple entry/exit points and handle concurrency in that case.
4. Revenue generation based on vehicle type from point 2 and parking hours.

nakulkumar
Автор

Watched the whole video, enjoyed your code walkthrough and explanations. Thank you.

OM-qjpy
Автор

After going through several blog, I found what I am looking for.
Nice work udit.

pprateektv
Автор

Best video of parking lot... The real world one... Thanks Udit.

sanke
Автор

Nice work Udit, Few pointers to your design :

1. Don't you think methods in the Printer class should be static?
2. ParkingLot object should be configurable from the command line, I mean when you invoke the system, max_capacity should be injected variable.
3. ParkingLot object should be a singleton object, If you invoke from the command line in a loop for different command then you will end up having many ParkingLot objects.

naval
Автор

That's the best low level design video I have ever seen.

mohitpatidar
Автор

thanks Udit! Many things to learn here

manishmahajan