Pergunta de entrevista da empresa Juniper Networks

Apple/orange and some more puzzles on splitting square