MediaAgility interview question

Pattern Problem in Java