
Permutation: in order. n!/(n – m)!
Combination: order not considered. n!/((n – m)! * m!)
Key point of this problem is to transfer i – j = nums[i] – nums[j] into i – nums[i] = j – nums[j].

Permutation: in order. n!/(n – m)!
Combination: order not considered. n!/((n – m)! * m!)
Key point of this problem is to transfer i – j = nums[i] – nums[j] into i – nums[i] = j – nums[j].