Clerisy Solutions interview question

Question from pattern in dsa.