Archive for May, 2012

Notes on Computational Electromagnetics

May 26th, 2012 1 comment

Today I uploaded an old set of notes (in CHINESE) that I made when I was in grad school. Check it out if you are interested:

http://www.jlao.net/emnotes

Sudoku Solution – Project Euler #96

May 3rd, 2012 No comments

This is a Python solution for Project Euler #96, to find the solution for sudokus.

The speed is modest (0.750s with pypy on Windows 7 @ i5 2.60GHz), but the code is relatively short and hopefully the idea is clear. Enjoy.
1. Find candidates for all items. If only one exists for a blank, fill it in.
2. Note down the blank with least but more than one candidates.
3. Copy the matrix and trial the candidates recursively until all blanks are filled.
Read more…

Categories: Technical Tags: , ,