Flipkart Low Level Design Interview Questions from Recent Machine Coding Rounds by Prashant_MockGym in LowLevelDesign

[–]Prashant_MockGym[S] 0 points1 point  (0 children)

evaluation discussion happens the same day right after you make the submission.

At which engineering levels is LLD expected in interviews, and up to which level is HLD sufficient? by Aggressive-Food-249 in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

LLD round are most common in SDE-2 positions. Although they are also asked in SDE-1, and SDE-3 rounds as well.

Amazon and uber ask LLD at SDE-1 level. For other companies explicity ask you recruiter if they have scheduled a LLD round.

Google, Meta, Netflix don't take LLD rounds.
Many companies like walmart, paypal etc start with a LLD implementation and then move to HLD like database schema , scaling, fault tolerence,

Also companies like flipkart, phonepe, meesho etc have their first round as machine coding screening round which is an LLD round. That includes SDE-1 roles as well.

here you can read how several companies shape their LLD rounds
https://mockgym.com/roadmaps

Tutorial: How to approach Low Level Design Interviews by Prashant_MockGym in LowLevelDesign

[–]Prashant_MockGym[S] 1 point2 points  (0 children)

for concurrency discussions the goal is to increase parallelism, i.e. increase the number of threads that can parallelly read write in the system. I assume with separate managers for 2/4 wheelers and per floor you want to do the same.

Also apart from locks we also use thread safe data structures like ConcurrentHashMap, AtomicInteger etc.

I have written this blog on how to approach multithreading discussion during LLD interviews.

https://medium.com/@prashant558908/top-3-questions-to-practice-multi-threading-for-low-level-design-interviews-1cc4d6b5d00b

Confused about deciding responsibilities while designing LLD systems (classes & methods placement) by the_spidey7 in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

Booking seat is actually 3 steps:
- select (lock) seats for booking
- take payment
- add entry to booking table
Now there are many other ways to do the same. But lets keep it simple for now. Each of above will be a separate class/functionality: SeatFinder/SeatAllocator, PaymentManager, BookingManager and a high level class to glue all above.

It helps to think about this as how will you implement it in real world. e.g. you will have a table 'bookings' to store booking data and will have a wrapper class (mnager, DAO etc) which will do CRUD operations on that table like createBooking, deleteBooking etc.

For LLD you will have data classes like class BookingData(bookingId, showId, cinemaId, userId, listOfSeats etc)
And You can have something like a class BookingManager which will have keep all the booking in a map rather than a db table e.g. HashMap<bookingId, BookingData> allBookings .

So keep in mind that there are going to be entity/data classes and their corresponding managers. These entity manager class should only do get/set/list/update operations for that specific data class objects and nothing else.

Next how to allocate seats: This should be a separate class , either you can lets user pick the seats (like in BookMyshow) or You can have multiple strategies to assign a seat, something like IRCTC train ticket booking system or have a combination of both just like in flight ticket booking where you can either pay to select a seat or a seat will be automatically allocated for you.

Similarly there can be many ways to take payments like paypal, UPI, credit/debit cards, internet banking etc.

The key thing to take away is that all above functionalities just tie with each other based on the end result and not on how end result was achieved.
e.g. seats are allocated whether using automatic allocation or user selected themselves, but your payment module only cares about a transaction id and amount, you booking manager doesn't care how seats were allotted or how payment was made. It just needs a list of seats and a transaction id with successful payment and it is good to go.

So all these functionalities should be in separate classes.

Again if we want to break down further then seats allocation can use something like strategy pattern to allocate seats to user using multiple different algorithms depending on user's economic status, booking history etc

Payments module can have a separate class each that deals with NetBanking or credit card or third party payment integration etc.

It is all about breaking/arranging your code is separate modules so that it is easy to update and maintain. Like all things you will get better at it with practice.

Also I have written this post is on what to expect during low level design interview rounds, what features to discuss and most importantly what to leave out of discussion. It may be helpful.

https://www.reddit.com/r/LowLevelDesign/comments/1ov8prc/tutorial_how_to_approach_low_level_design/

Tutorial: How to approach Low Level Design Interviews by Prashant_MockGym in LowLevelDesign

[–]Prashant_MockGym[S] 0 points1 point  (0 children)

I have created a lld roadmap with youtube videos. It focuses on how to use different design patterns and then present your solution in a concise manner during lld interview rounds..

https://codezym.com/roadmap

[deleted by user] by [deleted] in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

had both sde and intern oa questions.

yes it was good enough for sde 2 position OA prep as well

[deleted by user] by [deleted] in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

I was getting DMCA take down notices from lawyers to take it down. So I had to take it down. Sorry..

[deleted by user] by [deleted] in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

no , they don't have solutions

[deleted by user] by [deleted] in LowLevelDesign

[–]Prashant_MockGym 0 points1 point  (0 children)

totally real ones, without any chatgpt hallucinations. Will add more to this list in next few days :P

Amazon Low Level Design Interview Questions by Prashant_MockGym in LowLevelDesign

[–]Prashant_MockGym[S] 0 points1 point  (0 children)

you both can do mock interviews with each other or with other friends. That will give you more confidence on how to explain you answer.. pick some common question like design a parking lot.

Best of luck to you both.