2020 第 23 周 LeetCode 记录

Yiran at 
1460. Make Two Arrays Equal by Reversing Sub-arrays 链接到标题 比较两个列表是否可以通过翻转等价,统计列表中字母出现的次数判断,或者可以直接排序判断。class Solution: def canBeEqual(self, target: List[int], arr: List[int]) -> bool: c = collections.Counter(target) for a in arr: c[a] -= 1 if c[a] max{ secondMax = max max = e }else if e>secondMax{ sec……