You are given an array of positive integers nums.
In a single operation, you can swap any two adjacent elements if they have the same count of set bits in their binary representation. You are allowed to perform this operation any number of times.
Return true if it is possible to sort the array in ascending order, or false otherwise.
Constraints:
nums.length
nums[i]
You are given an array of positive integers nums.
In a single operation, you can swap any two adjacent elements if they have the same count of set bits in their binary representation. You are allowed to perform this operation any number of times.
Return true if it is possible to sort the array in ascending order, or false otherwise.
Constraints:
nums.length
nums[i]