C++20 sections · 1024 units
Open in Course

Boy or Girl - Implementation

Complete solution

function boy_or_girl(username)
distinct_chars := empty set
for each char in username insert char into distinct_chars
if size of distinct_chars is odd then
 return "IGNORE HIM"
else
 return "CHAT WITH HER"