Search:

Type: Posts; User: firstTimeJava

Search: Search took 0.16 seconds.

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

    Yea that's how I figured to get around the math.pow() I was just having some trouble implementing that into the algorithm.
  2. Need a more efficient algorithm for finding the highest pth of a number.

    This is my algorithm so far:


    public static int getPth(int x) {
    int largestP = 1;

    for (int p = 1; p < x; p++) {
    for (int b = 1; b < x; b++) {
    ...
Results 1 to 2 of 2