primeVisits(arrays)

problem:https://online.codingblocks.com/player/7730/content/4712
soln:https://ide.codingblocks.com/s/38550

test case2–wrong
test case 3-- time limit exceeded

Hey Kanika, can you please tell the name of this problem.

its PRIME VISITS under challenges-arrays problem no.13

Hey Kanika, the constraints for this problem are big so your approach is giving TLE. This solution can be optimised using sieve of Eratosthenes. You can watch this topic in number theory section of your course.

1 Like