Doubt is in prime visit

getting run error in one of the test case
can’t get why.

Hello @shubham.mehla2000,

There are two issues with your problem:
1.Size of array
2. Unnecessary iteration of outer loop.

I have modified your code:

Hope, this would help.
Give a like, if you are satisfied.

1 Like