Pergunta de entrevista da empresa Meta

I was asked 2 questions: one was a string question, and one was a probability question.