Marks :100
: 1 | : 0
One pair of twins are born in a village . The parents wanted to name the children and for this, they went to the village leader. The leader suggested they keep the names of the children such that the difference between the frequency of each letter from 'a' to 'z' between two names is at most 3. You will be given two names. If the two names satisfy the condition print a single string "YES". If the condition is not met, print "NO".
The first line of the test case contains two space-separated strings s1 and s2 denoting the names of the first child name and second child name. Constraints:
($$$ 1 \le length of each name \le 1000 $$$)
print "YES" if it is possible to name the twins else "NO"
abcdeef abaaacc
YES
NO
NO
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.