Saturday, June 15, 2013

project euler problem 222

sphere packing


I learned quite a bit from this problem. 

First, this problem can be solved by pencil and paper. I learned it from BrianHuffman on the third page of the discussion thread. BrianHuffman's explanation is very lucid. I like it.

 I also practiced Dynamic programming method and random number method on this problem. Dynamic programming method gives me definite result but it takes a little bit more time(5-6 seconds). I also tried with some random number method, it seems inefficient but the result is just the opposite. It only takes 8ms. 

No comments:

Post a Comment