Pergunta de entrevista da empresa MathWorks

How to optimize your solution(reducing time complexity)? Questions about the project(what if 2 users try to book at the same time).