- Arrays, Mathematical, Prime Number, sieve

Minimize swaps required to make all prime-indexed elements as prime

#include using namespace std;  const int mxn = 1e4 + 1;bool prime[mxn + 1];  void SieveOfEratosthenes(){    memset(prime, true, sizeof(prime));      for (int p = 2; p * p