Great blog to read:
And then, start to implement the solution using C# code:
Read the blog,
and then, implement the solution using c# code:
Solution 3: (good workout on C# KeyValuePair class)
and then, convert C++ code to C# code from the blog:
Excellent code in C++, using class for node on the board. Learn a few things, fun to play with the code
source code from the blog:
read the blog: (Good coding! practice more based on this blog)
and convert the C++ code to C# code, (great workout on C# LinkedList for blank nodes)
read the blog:
and convert Java code to C# code, great workout on C# and logic checking "return false"
Thanks for the blog's highlight line of code on back tracking; finally, I got it! My logic thinking has flaws on back tracking; extra backtracking is not a good. Minimize the back tracking, only do it when "return false". It makes sense to do that.
blog: (Excellent implementation! no extra line or number in the code! Best for memorization! Go through other solutions later. )
算法理解了, 代码可以记住了; 开始看不同的题解, 看看高手的代码; 从不同的题解中, 模仿模仿! 像打网球, 多接触不同的打法, 开阔眼界; 接着看这道题的题解. 试着从不同角度看一个问题, 多练习改代码; 看自己能不能有自己的看法, 去尝试一点更改, 玩一点花样; 增加练习C#编程的机会.
Also, the code written has been work on readability, learned through my favorite book reading:
Those favorite rules I like to learn, pick up and follow:
Big fan of DRY (Do not repeat yourself) principle, do one thing a time, break giant expression, using explaining variable or summary variable, and abstract the thing to a function, extract a subproblem to a function. The code is also modified to fit into short memory, less mental baggage to read through.
BFS, using queue - try to convert it to C#