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 @@ -111,6 +111,7 @@ tags:
111
111
#### Python3
112
112
113
113
``` python
114
+
114
115
from typing import List
115
116
from math import factorial
116
117
import heapq
@@ -183,11 +184,13 @@ class Solution:
183
184
if not fff:
184
185
return []
185
186
return ppp
187
+
186
188
```
187
189
188
190
#### Java
189
191
190
192
``` java
193
+
191
194
import java.util.* ;
192
195
193
196
class DPHelper {
@@ -345,11 +348,13 @@ class Solution {
345
348
return ans;
346
349
}
347
350
}
351
+
348
352
```
349
353
350
354
#### C++
351
355
352
356
``` cpp
357
+
353
358
class Solution {
354
359
long long f[ 105] ;
355
360
public:
@@ -390,11 +395,13 @@ public:
390
395
return ans;
391
396
}
392
397
};
398
+
393
399
```
394
400
395
401
#### Go
396
402
397
403
```go
404
+
398
405
func permute(n int, k int64) []int {
399
406
var f [105]int64
400
407
f[0] = 1
@@ -446,6 +453,7 @@ func permute(n int, k int64) []int {
446
453
}
447
454
return ans
448
455
}
456
+
449
457
```
450
458
451
459
<!-- tabs: end -->
You can’t perform that action at this time.
0 commit comments