MathWorks Interview Question

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