Pergunta de entrevista da empresa Hitachi Vantara

How would you filter and sort an array of foods based on properties using common loops.