Leetcode study time

我是怎么招聘程序员的

打一点花样; 增加练习C#编程的机会.

blog of a facebook programmer working on leetcode questions:

 

Leetcode solution on git hub (use this one more often, best answer,
author profile: http://coolshell.cn/haoel)

Also, the code written has been work on readability, learned through my
favorite book reading:

  1. One more to read

Those favorite rules I like to learn, pick up and follow:

  1. Leetcode using C#

 

https://github.com/haoel/leetcode/tree/master/algorithms

and then, implement the solution using c# code:

  1. Reverse nodes in k group

Solution 6:

递归版本:空间O(1),时间O(n)

Read the blog,

http://www.cnblogs.com/grandyang/p/4606710.html

https://github.com/jianminchen/sudokuSolver/blob/master/Program.cs

  1. All 158 leetcode algorithm implementation in git hub:

Solution 5:

August 2, 2015

 

http://www.cnblogs.com/wwwjieo0/p/3891037.html

https://github.com/jianminchen/sudokuSolver/blob/master/Program6.cs

http://blog.csdn.net/u014674776/article/category/2296455

Excellent code in C++, using class for node on the board. Learn a few
things, fun to play with the code

在http://zzk.cnblogs.com/ 用”找一物色”, 花了几独小时, 找有比好之Leetcode博客.

blog:

https://github.com/xisuogu/LeetSharp/tree/master/LeetSharp

Solution 10:

http://www.cnblogs.com/lichen782/p/leetcode_Reverse_Nodes_in_kGroup.html

https://github.com/zwxxx/LeetCode/blob/master/Sudoku_Solver.cpp

Read the leetcode question and solutions:

 

  1.  binary tree

https://github.com/jianminchen/sudokuSolver/blob/master/Program3.cs

劳动了几乎单小时, 总算可以出外放松,打起网球,准备明日登山了!

variable,
and abstract the thing to a function, extract a subproblem to a
function. The code is also modified to fit into short memory,

Try it myself and compare to solutions in my blog:
http://juliachencoding.blogspot.ca/2015/07/leetcode-lowest-common-ancestor-in.html

and convert the C++ code to C# code, (great workout on C# LinkedList for blank nodes)

http://www.cnblogs.com/chkkch/archive/2012/11/26/2788795.html

 

  1. Find lowest common ancestor in binary tree:

Write a program to solve a Sudoku puzzle by filling the empty cells.

 

 

 

C# code:

Big fan of
DRY (Do not repeat yourself) principle, do one thing a time, break giant
expression, using explaining variable or summary

 

Empty cells are indicated by the character '.'.

blog: (Excellent implementation! no extra line or number in the code!
Best for memorization! Go through other solutions later. )

July 19, 2015

 

 

 

 

 

 

 

https://github.com/jianminchen/sudokuSolver/blob/master/Program5.cs

Problem statement:

 

Solution 9:

http://shanjiaxin.blogspot.ca/2014/04/sudoku-solver-leetcode.html

Solution 3: (good workout on C# KeyValuePair class)

 

source code from the blog:

 

Solution 8:

https://github.com/Sayericplz/myleetcode/blob/master/isValidSudoku.cpp

http://yucoding.blogspot.ca/2013/12/leetcode-question-sudoku-solver.html

 

 

less
mental baggage to read through. 

And then, start to implement the solution using C# code:

http://www.jiuzhang.com/solutions/sudoku-solver/

 

and convert Java code to C# code, great workout on C# and logic
checking “return false”

 

http://shop.oreilly.com/product/9780596802301.do

 

read the blog: (Good coding! practice more based on this blog)

blog:

http://blog.csdn.net/linhuanmars/article/details/20748761

https://github.com/jianminchen/sudokuSolver/blob/master/Program10.cs

Solution 2: 

Solution 7:

开阔眼界; 接着看即道题之题解. 试着自不同角度看一个题材, 多练习改代码;
看自己力所能及无克起谈得来的见, 去品尝一点移,

 

You may assume that there will be only one unique solution.

https://github.com/yinlinglin/LeetCode/blob/master/SudokuSolver.h

 

 

C# code:

 

solution 4:

C# code:

https://github.com/jianminchen/sudokuSolver/blob/master/Program8.cs

算法理解了, 代码可以记住了; 开始看不同之题解, 看看高手的代码;
从不同之题解中, 模仿模仿! 像于网球, 多接触不同之打法,

Solution 1: 

https://github.com/jianminchen/sudokuSolver/blob/master/Program9.cs

 

https://github.com/xiaoxq/leetcode-cpp/blob/master/src/SudokuSolver.cpp

extra backtracking is not a good. Minimize
the back tracking, only do it when “return false”. It makes sense
to do that.

Thanks for the blog’s highlight line of code on back tracking; finally,
I got it! My logic thinking has flaws on back tracking;

C# code:

 

https://github.com/jordandong/myleetcodes/blob/master/SudokuSolver.cpp

read the blog:

 

http://blog.csdn.net/fightforyourdream/article/details/16916985

blog:

BFS, using queue – try to convert it to C#

 

http://www.cnblogs.com/TenosDoIt/p/3800485.html

C# code:

 

and then, convert C++ code to C# code from the blog:

http://bangbingsyb.blogspot.ca/2014/11/leetcode-valid-sudoku-sudoku-solver.html

 

 

Read solutions:

 

https://github.com/jianminchen/sudokuSolver/blob/master/Program7.cs

 

https://github.com/jianminchen/sudokuSolver/blob/master/Program2.cs

Great blog to read:

 

https://github.com/jianminchen/sudokuSolver/blob/master/Program4.cs

https://github.com/rffffffff007/leetcode/blob/master/Sudoku%20Solver.java