Pergunta de entrevista da empresa Bloomberg

Got asked 2 easy leetcode questions that required basic data structure knowledge, as well as questions about the time complexity and possible optimization for each of those problems