Ascertia interview question

Current stack I am working on