Pergunta de entrevista da empresa Tata Consultancy Services

Different ways of finding same elements in an array