(int[] arr, int n)
| 271 | } |
| 272 | |
| 273 | static int getNPerm(int[] arr, int n) { |
| 274 | int idx = 0; |
| 275 | for (int i = 0; i < n; i++) { |
| 276 | idx *= (n - i); |
| 277 | for (int j = i + 1; j < n; j++) { |
| 278 | if (arr[j] < arr[i]) { |
| 279 | idx++; |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | return idx; |
| 284 | } |
| 285 | |
| 286 | static int getComb(int[] arr, int mask) { |
| 287 | int end = arr.length - 1; |
no outgoing calls
no test coverage detected