WebKul interview question

difficult level of pattern