Acko sde2 Machine Coding
Anonymous User
691

Design Turf Booking System like Playo.
Owner can add turfs and see bookings.
user can register and book a slot.
user can cancel booking.
user can view all bookings.

I have taken Turf class. In that Turf class I am mainting a List of slots.
So far I think. Turf class should have all available slots as a list.
But the interview said he want Slot class should contain Turf object.
For that reason he rejected me.
Please suggest who is right which approach is right.
He asked me how you control concurrency bookings.
I told using pessimistic and optimistic locks and also we can use isolation level sterilization.
He simply didn't understand and don't know what is pessimistic and optimistic lock.
Honestly I am very disappointed with the way.
Taking by some inexperienced guys and they only know one way and always want people to do in that same way.

He waited me 45 mins in cabin. He joined after 45 mins and simple no introduction. Just shared the question that's it.

Comments (3)