def is_anagram(s1, s2):
    """ Figures out if the two strings are anagrams.

    Complexity: O(n)

    Args:
        s1: str
        s2: str

    Returns:
        boolean, True if s1 is an anagram of s2.
    """
    letters = {}
    for c in s1:
        if c in letters:
            letters[c] += 1
        else:
            letters[c] = 1
    for c in s2:
         if c in letters:
             letters[c] -= 1
             if letters[c] == 0:
                 del letters[c]
         else:
             return False

    return len(letters) == 0