Skip to content

Commit f34b4ab

Browse files
refactor 634
1 parent 529a8c5 commit f34b4ab

File tree

1 file changed

+0
-17
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-17
lines changed

src/main/java/com/fishercoder/solutions/_634.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 634. Find the Derangement of An Array
5-
*
6-
* In combinatorial mathematics, a derangement is a permutation of the elements of a set, such that no element appears in its original position.
7-
8-
There's originally an array consisting of n integers from 1 to n in ascending order, you need to find the number of derangement it can generate.
9-
10-
Also, since the answer may be very large, you should return the output mod 109 + 7.
11-
12-
Example 1:
13-
Input: 3
14-
Output: 2
15-
Explanation: The original array is [1,2,3]. The two derangements are [2,3,1] and [3,1,2].
16-
17-
Note:
18-
n is in the range of [1, 106].
19-
*/
203
public class _634 {
214
public static class Solution1 {
225
/**

0 commit comments

Comments
 (0)