Skip to content

Commit ec09b8a

Browse files
refactor 1175
1 parent 835a663 commit ec09b8a

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

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

-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1175. Prime Arrangements
5-
*
6-
* Return the number of permutations of 1 to n so that prime numbers are at prime indices (1-indexed.)
7-
* (Recall that an integer is prime if and only if it is greater than 1,
8-
* and cannot be written as a product of two positive integers both smaller than it.)
9-
* Since the answer may be large, return the answer modulo 10^9 + 7.
10-
*
11-
* Example 1:
12-
* Input: n = 5
13-
* Output: 12
14-
* Explanation: For example [1,2,5,4,3] is a valid permutation, but [5,2,3,4,1] is not because the prime number 5 is at index 1.
15-
*
16-
* Example 2:
17-
* Input: n = 100
18-
* Output: 682289015
19-
*
20-
* Constraints:
21-
* 1 <= n <= 100
22-
* */
233
public class _1175 {
244
public static class Solution1 {
255
public int numPrimeArrangements(int n) {

0 commit comments

Comments
 (0)