Pergunta de entrevista da empresa Google

OOPS bassed DSA Question- faced difficulty