1460-make-two-arrays-equal-by-reversing-subarrays

DevGod
Vtuber
/** * @param {number[]} target * @param {number[]} arr * @return {boolean} */
var canBeEqual = function(target, arr) { return _.isEqual(_.countBy(target),_.countBy(arr));};
class Solution: def canBeEqual(self, target: List[int], arr: List[int]) -> bool: return Counter(target).items() == Counter(arr).items()