Pergunta de entrevista da empresa Pinterest

Given an array, split it into 2 separate arrays based on height or something