Cant understand the answer


  • 2
    D

    Input: ["and","dan"]
    Output: []
    Expected: ["and","dan"]

    Ok now, how is it an anagram? It's either I don't get your definition or you guys got it wrong.


  • 7
    S

    and and dan both are composed of 1 x a, 1 x n, 1 x d so they are anagram.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.