Myridius interview question

coding assessment. Given coding problems