File tree 1 file changed +8
-0
lines changed
solution/3400-3499/3470.Permutations IV
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ tags:
108
108
#### Python3
109
109
110
110
``` python
111
+
111
112
from typing import List
112
113
from math import factorial
113
114
import heapq
@@ -180,11 +181,13 @@ class Solution:
180
181
if not fff:
181
182
return []
182
183
return ppp
184
+
183
185
```
184
186
185
187
#### Java
186
188
187
189
``` java
190
+
188
191
import java.util.* ;
189
192
190
193
class DPHelper {
@@ -342,11 +345,13 @@ class Solution {
342
345
return ans;
343
346
}
344
347
}
348
+
345
349
```
346
350
347
351
#### C++
348
352
349
353
``` cpp
354
+
350
355
class Solution {
351
356
long long f[ 105] ;
352
357
public:
@@ -387,11 +392,13 @@ public:
387
392
return ans;
388
393
}
389
394
};
395
+
390
396
```
391
397
392
398
#### Go
393
399
394
400
```go
401
+
395
402
func permute(n int, k int64) []int {
396
403
var f [105]int64
397
404
f[0] = 1
@@ -443,6 +450,7 @@ func permute(n int, k int64) []int {
443
450
}
444
451
return ans
445
452
}
453
+
446
454
```
447
455
448
456
<!-- tabs: end -->
You can’t perform that action at this time.
0 commit comments