File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Java range operator? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java range operator?" Watch "Java range operator?" New topic

Java range operator?

Winston Gutkowski

Joined: Mar 17, 2011
Posts: 7016

Aleksey Vladimirovich wrote:My God, now I got how wrong I was
I thought solving of this problem by Winston's approach would request some fancy and very slow algorithm, but I was so wrong. Results talk for themselves.
Thank you guys for steering me to the right solution and your patience! You rock, guys!

And isn't it much more fun when you work out the solution for yourself? That's why we DON'T just hand out answers here.

And well done.


Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 36453
fred rosenberger wrote: . . . I haven't done the math to figure out the complexity of each algorithm, . . .
Iterating the series of numbers to find their prime factors, multiplied by time to multiply those factors. At worst, quadratic, but for large numbers it may approach nlogn complexity.
Don't get me started about those stupid light bulbs.
subject: Java range operator?
Similar Threads
Leap year program
how to check if divisible by 2 in <c:if>
counting and primes
Returning if a number is prime. (Chapter on Objects and classes. OOP)