You are given an integer array nums of length n.
A positive integer k is a divisor of n (nums into contiguous subarrays of length k, the integer k is called sortable if each subarray can be independently cyclically rotated such that the entire array becomes sorted in nondecreasing order.
Return the sum of all sortable integers k.
Constraints:
n nums.length
nums[i]
You are given an integer array nums of length n.
A positive integer k is a divisor of n (nums into contiguous subarrays of length k, the integer k is called sortable if each subarray can be independently cyclically rotated such that the entire array becomes sorted in nondecreasing order.
Return the sum of all sortable integers k.
Constraints:
n nums.length
nums[i]