From: Kenji Sihan Date: 2006-01-01T08:14:52+09:00 Subject: Re: Numeric Maze (#60) Maurice Codik wrote: >> >> solve(222, 9999) >> result: >> Total time taken in seconds: 56.0 >> [222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, >> 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, >> 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, >> 306, 308, 310, 312, 624, 1248, 2496, 2498, 4996, 4998, 9996, 9998, >> 19996, 19998, 9999] > > > Is this last one correct? I get for this for (222, 9999) -- > [222, 224, 112, 56, 28, 14, 16, 18, 36, 38, 76, 78, 156, 312, 624, 1248, > 2496, 2498, 4996, 4998, 9996, 19992, 19994, 9997, 9999] > > Maurice Yea I think it is correct. I thought I had a shortcut in my algorithm, which excluded solutions like that one. My solution for (222, 9999) is slightly different though: [222, 224, 112, 56, 28, 14, 16, 18, 36, 38, 76, 78, 156, 312, 624, 1248, 496, 2498, 4996, 4998, 9996, 9998, 19996, 19998, 9999] in +- 38 seconds -- Posted via http://www.ruby-forum.com/.