โ† Thoughtworks questions

Verify sock pairs from string of RGB characters

Filed under Thoughtworks

The question

Given a string consisting of characters 'R', 'G', and 'B' representing socks, determine whether all socks can be paired up completely. Print 'True' if every color has an even count, otherwise print 'False'.

No write-up yet. Related questions below have one.

Related Thoughtworks questions

Collected from public candidate posts and coding forums. Updated Nov 2026.