UST interview question

parking lot problem for coding