[LeetCode] Find if Array Can Be Sorted

1 · · Jan. 21, 2024, 5:39 a.m.
3011. Find if Array Can Be Sorted You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of set bits. You are allowed to do this operation any number of times (including zero). Return true if you can sort the array, else return false. ...