Pergunta de entrevista da empresa MicroStrategy

One is find the common elements in two arrays and another is output pascal's triangle.