Pergunta de entrevista da empresa Meta

Python: 1. count occurrence of a word , 2. Uncommon words from two sentences 3. Replace None with previous value SQL: questions on Sales, Promotion, Product tables. Calculation of percentage of total sales on start and end dates with overall sales, etc.

Resposta da entrevista

Sigiloso

17 de dez. de 2020

def uncommonFromSentences(self, A: str, B: str) -> List[str]: count = {} count = collections.Counter(A.split()) count+= collections.Counter(B.split()) l = [] for key ,value in count.items(): if value == 1: l.append(key) return l