Given an integer array nums, you are permitted to swap the elements at any two distinct indices i and j if and only if the greatest common divisor of nums[i] and nums[j] is strictly greater than
You may perform this swap operation any number of times.
Return true if it is possible to sort nums in ascending order, or false otherwise.
Constraints:
nums.length
nums[i]
Given an integer array nums, you are permitted to swap the elements at any two distinct indices i and j if and only if the greatest common divisor of nums[i] and nums[j] is strictly greater than
You may perform this swap operation any number of times.
Return true if it is possible to sort nums in ascending order, or false otherwise.
Constraints:
nums.length
nums[i]