-
2 Comments
Martin Hrabina
on 26 Dec 2017
Hey ;)
Could you please comment on my solution? I see the size is much larger than leading solution, but regardless. I would say my solution is lame, because it was taylored for this specific set of conditions (test suite), I would like to make "universal" solution, which could work for random inputs, but this taylored solution seems much easier. What do you think?
Thank you for your opinion :)
goc3
on 27 Dec 2017
Try setting up a loop to test individual values using isprime() that will terminate upon reaching the fifth prime number to prevent an inordinately long loop.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!