Crying Colours
You have a total of $3N$ balls of colours $Red$, $Blue$ and $Green$. There are exactly $N$ balls of each colour. These $3N$ balls are now distributed to $3$ boxes such that each box contains exactly $N$ balls. You are given the contents of each box. You would like the $1^{st}$ box to contain all the **red** balls, the $2^{nd}$ box to contain all the **green** balls, and the $3^{rd}$ box to conta
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start