Pergunta de entrevista da empresa Bloomberg

count number of triangles in given array of triangle sides.