Version 3.1
Finished programming assignment03, but I just optimized space not for running time yet.
Need to think more deeply later.
Of course I got the correct answer in this first version.