Goldman Sachs interview question

Solving a coding problem about finding common element between 2 arrays.