Python solution


  • 1
    S
        # get the total count of all instances of character in both sets
        # if the counts do not match return that character
        
        split_str_t = list(t)
        uncontained_str = ''
        
        for element in split_str_t:
            if s.count(element) != t.count(element):
                uncontained_str = element
                
        return uncontained_str

Log in to reply
 

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