Search:

Type: Posts; User: mccolem

Search: Search took 0.12 seconds.

  1. Replies
    6
    Views
    1,348

    Re: Efficiency problem

    If I do that for 3-digit factors, the first palindrome I find is

    995*583 = 580085

    which is smaller than 993*913 = 906609
  2. Replies
    6
    Views
    1,348

    Re: Efficiency problem

    public long getLargestPalindrome1(){

    for( long i = highValue; i > highValue/10 ; i = i - 1){

    if(i < factor2) return max;
    //Here the method exits if i is smaller than the smallest...
  3. Replies
    6
    Views
    1,348

    Re: Efficiency problem

    I have tried that already but its complicated because if the factors are even number digits e.g. 99, I have to decrease i by 11 and j by 1, but if it is an odd number of digits e.g. 999 I have to...
  4. Replies
    6
    Views
    1,348

    Efficiency problem

    I have the following problem to solve:

    Find the largest palindromic number made from the product of two N-digit numbers.


    This is my class to find the largest palindromic number:



    public...
Results 1 to 4 of 4