Pergunta de entrevista da empresa Ashika

Mathematical analysis and a coding question