Handling flight landing requests with one runway

In my recent interview I was asked about the below scenario.

There is only one runway in an airport.
There should be some time gap between one airplane landing and other airplane coming(example 3min).

Eg: There is a plane landing at 10:00 AM and other plane is in the request to land at 10:03 AM.
If there is a request that comes for 10:01 it should not be accepted.

There will be multiple requests coming(with time) and we should be able to determine if we can handle the request or not
to land the plane on the runway.

Sad part is interviewer was rude and he did not elaborate much beyod these points.

One thing he mentioned was this should not be handled with DB, He was expecting answer that could be handled at in memory side.
Probably he was expecting answer in terms of some datastructures.

My Answer:

I suggested that we can maintain a map of all the requests and for any further request we can check the map to determine the if the plane could be landing.

He was not convinced with my answer.

In most of my recent interviews I was asked about handling things at in memroy side.

Comments (6)