Pergunta de entrevista da empresa Ancestry

Coding question- medium difficulty level questions from hacker rank/leet