Practice Problem Design a Parking Lot https://codezym.com/question/1 Parking Lot design is sort of the
Hello World of low level design questions.
Most people start their LLD interview preparation with this question.
Python solution video on the right takes you through the core features
like park, remove vehicle, search vehicle and also teaches you
how to clearly explain your design to interviewer step by step
in a 45-60 minute LLD interview.
For
Java , we have to implement our solution for a
multi-threaded environment using locking and thread safe data structures.
Video on the right show a simple solution using
synchronized keyword
which is the popular locking mechanism in Java.
However, using
synchronized or any other lock is simple but not efficient
as it locks out other threads from doing write operations
concurrently.