• + 0 comments

    Approach:

    1. Count the freq of the 1st string.
    2. Traverse the freq mapp and check whether it contains the atleast 1 same key(character)
    3. if yes --> return "YES"
    4. else -->return "NO"