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 (i.e., the same popcount in their binary representation).

Return true if you can sort the array in non-decreasing order using these operations; otherwise, return false.

Examples
Input: [8,4,2,30,15]
Output: true
Hints

Find if Array Can Be Sorted

You are given a **0-indexed** array of **positive** integers `nums`.