parameters: (self, words)
return_statement: return "".join(result)
docstring: :type words: List[str]
          :rtype: str
docstring_summary: :type words: List[str]
          :rtype: str
docstring_tokens: : type words : List [ str ] : rtype : str
function: def alienOrder(self, words):
          """
          :type words: List[str]
          :rtype: str
          """
          result, in_degree, out_degree = [], {}, {}
          zero_in_degree_queue = collections.deque()
          nodes = set()
          for word in words:
              for c in word:
                  nodes.add(c)
  
          for i in xrange(1, len(words)):
              if (len(words[i-1]) > len(words[i]) and
                      words[i-1][:len(words[i])] == words[i]):
                  return ""
              self.findEdges(words[i - 1], words[i], in_degree, out_degree)
  
          for node in nodes:
              if node not in in_degree:
                  zero_in_degree_queue.append(node)
  
          while zero_in_degree_queue:
              precedence = zero_in_degree_queue.popleft()
              result.append(precedence)
  
              if precedence in out_degree:
                  for c in out_degree[precedence]:
                      in_degree[c].discard(precedence)
                      if not in_degree[c]:
                          zero_in_degree_queue.append(c)
  
                  del out_degree[precedence]
  
          if out_degree:
              return ""
  
          return "".join(result)
function_tokens: def alienOrder ( self , words ) : result , in_degree , out_degree = [ ] , { } , { } zero_in_degree_queue = collections . deque ( ) nodes = set ( ) for word in words : for c in word : nodes . add ( c ) for i in xrange ( 1 , len ( words ) ) : if ( len ( words [ i - 1 ] ) > len ( words [ i ] ) and words [ i - 1 ] [ : len ( words [ i ] ) ] == words [ i ] ) : return "" self . findEdges ( words [ i - 1 ] , words [ i ] , in_degree , out_degree ) for node in nodes : if node not in in_degree : zero_in_degree_queue . append ( node ) while zero_in_degree_queue : precedence = zero_in_degree_queue . popleft ( ) result . append ( precedence ) if precedence in out_degree : for c in out_degree [ precedence ] : in_degree [ c ] . discard ( precedence ) if not in_degree [ c ] : zero_in_degree_queue . append ( c ) del out_degree [ precedence ] if out_degree : return "" return "" . join ( result )