Pergunta de entrevista da empresa MathWorks

Explaining your code from the HackerRank challenge, analyzing runtime