classSolution: defbusyStudent(self, startTime: List[int], endTime: List[int], queryTime: int) -> int: res = 0 for i in range(len(startTime)): if startTime[i]<=queryTime<=endTime[i]: res += 1 return res
classSolution: defpeopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]: res = [] for i in range(len(favoriteCompanies)): flag = False for j in range(len(favoriteCompanies)): if i==j: continue if len(set(favoriteCompanies[i]) - set(favoriteCompanies[j])) == 0: flag=True ifnot flag: res.append(i) return res