Pergunta de entrevista da empresa Forcepoint

Question on basic data structures and run time complexity