CloudRock Partners interview question

Basic coding questions with arrays loops