Pergunta de entrevista da empresa Arm

Programming a complex problem on paper was difficult for me. Think thoroughly before starting on paper.