← The arcade

Christmas · difficulty 3 of 3

Pack Santa's sleigh 🛷

Pack the presents into sacks that hold 20kg each. Take the heaviest present first and put it in the first sack it fits in, opening a new sack only when none have room. Print each sack's presents and weight.

This one is part of Pro. Plenty of arcade challenges are free to play right now.

Skills: sorting, for else, lists

Open the arcade