Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
For every rod, look through ‘rings’ to see if the rod contains all colors.
Create 3 booleans, 1 for each color, to store if that color is present for the current rod. If all 3 are true after looking through the string, then the rod contains all the colors.