Permalink
Switch branches/tags
Nothing to show
Commits on May 16, 2011
Commits on May 13, 2011
  1. SecondKata

    ggarciajr committed May 13, 2011
    Tentative #2
  2. Second kata

    ggarciajr committed May 13, 2011
    Tentative #1
Commits on May 10, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed May 10, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #2
    
    Using for comprehension and math optimization
Commits on May 9, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed May 9, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #1
    
    Using for comprehension
Commits on May 6, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed May 6, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #2
    
    removing an unused import
Commits on May 5, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed May 5, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #2
    
    Applying some math to make the algorithm a little bit faster.
Commits on Apr 29, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed Apr 29, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #2
Commits on Apr 26, 2011
  1. Second Kata - By considering the terms in the Fibonacci sequence whos…

    ggarciajr committed Apr 26, 2011
    …e values do not exceed four million, find the sum of the even-valued terms.
    
    Tentative #1
Commits on Apr 4, 2011
  1. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Apr 4, 2011
    Sixth solution.
    
    A whole new approach was attempted here. We have removed the loop throughout every single number to check if it is a multiple of 3 ou 5 to a mathematical approach using 2 different formulaes.
    1. the sum of the multiples 3 or 5 = sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 3 * 5
    2. the sum of multiples of 3 = ((n * (n + 1)) / 2) * d
        where n = 1000 / 3 (upper limit divided by the multiple)
                    d = multiple (in this case 3)
    
    with this solution we solve the performance issue of the previous solution by providing a constant-time solution.
    previous solution = 1 operation per number (i.e 10^10 will cause the function to run 10^10 steps)
    new solution = 3 operation per limit (1 to compute the sum of multiples of 3, 1 to compute the sum of multiples of 5, 1 to compute the sum of multiples of 3 * 5)
  2. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Apr 4, 2011
    Sixth solution.
    
    A whole new approach was attempted here. We have removed the loop throughout every single number to check if it is a multiple of 3 ou 5 to a mathematical approach using 2 different formulaes.
    1. the sum of the multiples 3 or 5 = sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 3 * 5
    2. the sum of multiples of 3 = ((n * (n + 1)) / 2) * d
        where n = 1000 / 3 (upper limit divided by the multiple)
                    d = multiple (in this case 3)
    
    with this solution we solve the performance issue of the previous solution by providing a constant-time solution.
    previous solution = 1 operation per number (i.e 10^10 will cause the function to run 10^10 steps)
    new solution = 3 operation per limit (1 to compute the sum of multiples of 3, 1 to compute the sum of multiples of 5, 1 to compute the sum of multiples of 3 * 5)
  3. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Apr 4, 2011
    Seventh solution.
    
    A whole new approach was attempted here. We have removed the loop throughout every single number to check if it is a multiple of 3 ou 5 to a mathematical approach using 2 different formulaes.
    1. the sum of the multiples 3 or 5 = sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 3 * 5
    2. the sum of multiples of 3 = ((n * (n + 1)) / 2) * d
        where n = 1000 / 3 (upper limit divided by the multiple)
                    d = multiple (in this case 3)
    
    with this solution we solve the performance issue of the previous solution by providing a constant-time solution.
    previous solution = 1 operation per number (i.e 10^10 will cause the function to run 10^10 steps)
    new solution = 3 operation per limit (1 to compute the sum of multiples of 3, 1 to compute the sum of multiples of 5, 1 to compute the sum of multiples of 3 * 5)
Commits on Apr 1, 2011
  1. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Apr 1, 2011
    Fourth solution.
    
    A whole new approach was attempted here. We have removed the loop throughout every single number to check if it is a multiple of 3 ou 5 to a mathematical approach using 2 different formulaes.
    1. the sum of the multiples 3 or 5 = sum of multiples of 3 + sum of multiples of 5 - sum of multiples of 3 * 5
    2. the sum of multiples of 3 = ((n * (n + 1)) / 2) * d
        where n = 1000 / 3 (upper limit divided by the multiple)
                    d = multiple (in this case 3)
    
    with this solution we solve the performance issue of the previous solution by providing a constant-time solution.
    previous solution = 1 operation per number (i.e 10^10 will cause the function to run 10^10 steps)
    new solution = 3 operation per limit (1 to compute the sum of multiples of 3, 1 to compute the sum of multiples of 5, 1 to compute the sum of multiples of 3 * 5)
Commits on Mar 30, 2011
  1. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 30, 2011
    Third solution.
    Refactoring fkSum to receive a list of multiples.
    Now we have a very generic method to calculate the sum of multiples
    of a given list less than an upperLimit
  2. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 30, 2011
    Second solution.
    Refactoring fkSum to receive the upperLimit value as a param.
  3. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 30, 2011
    First solution.
    Implementing a haskell function to compute the sum of all multiples
    of 3 or 5 less than 1000.
Commits on Mar 29, 2011
  1. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Sixth solution.
    Methods sum was refactored to use be more concise.
  2. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Fifth solution.
    Methods sum was refactored to use pattern matching.
  3. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Fourth solution.
    Methods sum and isMultiple was refactored in order to get a more functional code.
    Notice that the code is a bit more concise now.
  4. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Third solution.
    Method sum was refactored and now receives a sequence of ints as a parameter.
    And now, we have a little more generic function. It computes the sum of any given multiples for any given upperLimit
    We should notice the OO style in this solution.
  5. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Second solution. No use of param or helper method.
    Method sum was refactored and now receives the upperLimit int as a parameter.
    And now, we have a little more generic function. But it only computes the sum of multiples of 3 or 5.
    We should notice the OO style in this solution.
  6. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    First solution. No use of param or helper method.
    This is a very specific method and only works in one case.
    We should notice the OO style in this solution.
  7. adding .gitignore file

    ggarciajr committed Mar 29, 2011
  8. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Third solution. The method sum was refactored and now it receives a parameter. That parameter is the upper limit, so we can find out what is the sum of all multiples of a given combination (i.e 3 and 5 or 2 or 6, 7) less than the upper limit
  9. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    Second solution. The method sum was refactored and now it receives a parameter. That parameter is the upper limit, so we can find out what is the sum of all multiples of 3 or 5 less than the upper limit
  10. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 29, 2011
    First solution. No use of param or helper method.
    This is a very specific method and only works in one case.
  11. adding gitignore

    ggarciajr committed Mar 29, 2011
Commits on Mar 28, 2011
  1. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 28, 2011
    Fifth  solution.
    Method is_multiple was refactored. and it's more concise now.
  2. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 28, 2011
    Fourth solution.
    Method sum was refactored and it now receives an array 'multiples' as param  that is used to filter the numbers that will be summed up.
    This is a more generic solution since it accepts the upper limit and and an array of multiples as parameters.
    And, now we can sum up the multiples of any upper limit number using any combination of multiples.
  3. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 28, 2011
    Third solution.
    Method sum was refactored and it now receives a param 'multiple' that is used to filter the numbers that will be summed up.
    This is a more generic solution since it accepts the upper limit and the multiple as parameters, but it only works for one multiple at a time.
  4. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 28, 2011
    Second solution.
    Method sum was refactored and it now receives a param 'upper_limit' that is used to limit the sum of multiples.
    This is a more generic solution, but it only works for multiples of 3 or 5.
  5. First kata - find the sum all multiples of 3 or 5 less than 1000

    ggarciajr committed Mar 28, 2011
    First solution. No use of param or helper method.
    This is a very specific method and only works in one case.
  6. adding .gitignore

    ggarciajr committed Mar 28, 2011