Prime Arrangements Problem
Prime Arrangements Problem — ExecCode Easy DSA Practice
Solve the Prime Arrangements problem on ExecCode. Free online easy DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.
Description Return the number of permutations of 1 to n so that prime numbers are at prime indices (1-indexed.) (Recall that an integer is prime if and only if it is greater than 1, and cannot be written as a product of two positive integers both smaller than it.) Since the answ…
Practice Prime Arrangements free on ExecCode. Browse more ExecCode DSA problems.