Javalobby - Comments for "Algorithm of the Week: Determine if a Number is Prime"
http://java.dzone.com/articles/algorithm-week-determine-if
Comments for "Algorithm of the Week: Determine if a Number is Prime"enYes, I will change the above
http://java.dzone.com/articles/algorithm-week-determine-if#comment-107631
<!--paging_filter--><P>Yes, I will change the above function by i++ to i+=2 so that it will reduce the number time it goes for loop as any evn number apart from 2 doesn't qualify for prime number<BR /></p>Sat, 07 Dec 2013 02:46:06 -0500soniajain07comment 107631 at http://java.dzone.comI would have increased the
http://java.dzone.com/articles/algorithm-week-determine-if#comment-83225
<!--paging_filter-->I would have increased the counter with 2 at each iteration in the
isPrime function and divide by 3,5,7,9, … If it does not divide by 2 it
will not divide by 4,6,8, …Sun, 10 Jun 2012 10:19:19 -0400paulrussel3comment 83225 at http://java.dzone.com