Saturday, June 07, 2014

Problem 49

Problem 49: Prime permutations. 0.2 seconds in Python. One liner however one minute in Haskell.

Sunday, June 01, 2014

redoing a problem: 47

Problem 47: Distinct prime factors. Two seconds in Python, which is about the same as the previous code.


Friday, May 02, 2014

redoing problems: 48, 50

Problem 48: Self powers.  One line in both Python and Haskell.

Problem 50: Consecutive prime sum. Two lines in both Python and Haskell. One second and 30 seconds respectively.

Thursday, May 01, 2014

redoing problems: 44, 45, 46

Problem 44: Pentagon numbers. I actually read the forum and learned. 3 seconds in Haskell.

Problem 45: Triangular, pentagonal and hexagonal. 3 minutes in Haskell.

Problem 46: Goldbach"s other conjecture. Less than a second with one line in Haskell.

Sunday, April 27, 2014

redoing a problem: 96

Problem 96: Sudoku. It"s 30 lines in Python. I wrote in Haskell also. It"s 27 lines. The Python code runs in 18 seconds for the 50 problems and the Haskell code runs in 78 seconds.

Sunday, February 23, 2014

redoing a problem: Problem 42

Problem 42:  Coded triangle numbers. Rewrote the original python code and wrote a new Haskell code.

Saturday, January 04, 2014

problem 43

Problem 43: Sub-string divisibility. Six seconds in Haskell.

Wednesday, January 01, 2014

redoing a problem: 41

Problem 41: Pandigital Prime. Brute force with Haskell in half a second. You can skip all permutations other than 4 and 7 digits because all of them can be divisible by 3.

Sunday, December 22, 2013

redoing a problem: 40

Problem 40: Champernowne's constant. Now I understood infinite list and foldr/foldl in Haskell.

Tuesday, December 17, 2013

redoing a problem: 39

Problem 39: Integer right triangles. Simple brute force in Haskell. 20 seconds.