OneAdvanced interview question

They asked Question on pattern matching