You have a 3x3 square, fill with integers such that the sum for each row, for each column and in diagonal is 15. All the numbers must be different.
Hint: brute force is difficult (how many?), what would be number you put in the middle?
The Former Flickr Employees' Guide To Tumblr's Yahoo Survival
-
[image: Tumblr Yahoo]*Editor's note:* *Kakul Srivastava is CEO and
co-founder of Tomfoolery, Inc. She was General Manager for Flickr from 2004
- 2009 and h...
1 minute ago
I'm afraid you're wrong. Brute force solution runs within 0.78 sec, and it takes about 10 minutes to write it from scratch.
ReplyDeleteThe idea is that you don't need 0, and need 1-9, so that sum matches 45. Than you over-force problem for solution. As an easy corollary you understand that in center must be five, and other 4 pairs will than sum to 10 each.