Pregunta de entrevista de AKUNA CAPITAL

Two algorithms/coding questions, three math questions