← 返回 meta 的题目列表Validate Log Entries
类型:online_judge
Given a list of log entries, return false if the log doesn't make sense. Write a function def is_log_valid(logs: List[str]) -> bool: where logs is a list of strings representing log entries that might contain duplicates or conflicts. Output is a boolean indicating if the log is valid.
Example:
Input: ['start', 'end', 'start']
Output: False
Input: ['start', 'end', 'start', 'end']
Output: True
Example
Input
3
start end start