Pergunta de entrevista da empresa Tamarac

I was asked two leet code questions.