Mindo interview question

logic test for live coding