ALGORYC interview question

Basic coding questions, not too advanced.