1460. Make Two Arrays Equal by Reversing Sub-arrays Solution 1 (time O(n), space O(n)) class Solution(object): def canBeEqual(self, target, arr): """ :type target: List[int] :type arr: List[int] :rtype: bool """ return collections.Counter(target) == collections.Counter(arr)