PRDXN interview question

Based on machine test