Search:

Type: Posts; User: Zaphod_b

Search: Search took 0.10 seconds.

  1. Re: Need a more efficient algorithm for finding the highest pth of a number.

    I tried to start with the Original Poster's code but with improvements and printout values that might lead to further improvement. It was intended to be the beginning, not the end of the...
  2. Re: Need a more efficient algorithm for finding the highest pth of a number.

    Regardless of the speed of Math.pow(), you are calling it way too many times.

    I mean, think about it: The outer loop is trying different values of p. (Note seems a little wasteful to start with...
Results 1 to 2 of 2