Pregunta de entrevista de Cyware

two DSA coding problems with time complexity reasoning