Skip to content

Commit c8c0e42

Browse files
committed
Time: 77 ms (39.38%), Space: 16.8 MB (59.96%) - LeetHub
1 parent 71a28a4 commit c8c0e42

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def canBeEqual(self, target: List[int], arr: List[int]) -> bool:
3+
# Sort both arrays
4+
target.sort()
5+
arr.sort()
6+
7+
# Compare the sorted arrays
8+
return target == arr

0 commit comments

Comments
 (0)