April 24, 2016
Review N Queen problem, this one makes me easy to follow:
http://www.geeksforgeeks.org/backtracking-set-3-n-queen-problem/
My own blog:
http://juliachencoding.blogspot.ca/search/label/N-Queens%20problem
Find one problem on HackerRank:
https://www.hackerrank.com/challenges/queens-on-board
From January 2015, she started to practice leetcode questions; she trains herself to stay focus, develops "muscle" memory when she practices those questions one by one. 2015年初, Julia开始参与做Leetcode, 开通自己第一个博客. 刷Leet code的题目, 她看了很多的代码, 每个人那学一点, 也开通Github, 发表自己的代码, 尝试写自己的一些体会. She learns from her favorite sports – tennis, 10,000 serves practice builds up good memory for a great serve. Just keep going. Hard work beats talent when talent fails to work hard.
Showing posts with label N-Queens. Show all posts
Showing posts with label N-Queens. Show all posts
Sunday, April 24, 2016
Tuesday, January 12, 2016
Leetcode 51: N - Queen problems
January
12, 2016
Encourage myself to write
blogs about leetcode questions. The following talk encourages me a lot.
https://www.youtube.com/watch?v=R22dJ7bn-pU&list=PLgYNPs-V9YFPqcnEvbIy5hFE40BjxMbjw&index=2
Hiring Rockstars by Roger Philby
the person likes to write, and then the person must love to read, and then the person must be very curious and intellectual.
So, Julia likes to build up a good habit to write, and then, to read, and to be curious, and to be intellectual.
Julia is working on recursive function design, how to handle N-Queen problems. After 6 months, she totally forgets how to solve the problem; So, she continues to read more blogs about this algorithm.
Hiring Rockstars by Roger Philby
the person likes to write, and then the person must love to read, and then the person must be very curious and intellectual.
So, Julia likes to build up a good habit to write, and then, to read, and to be curious, and to be intellectual.
Julia is working on recursive function design, how to handle N-Queen problems. After 6 months, she totally forgets how to solve the problem; So, she continues to read more blogs about this algorithm.
Review the algorithm again. The following blog gives a good explanation, help
me understand the algorithm better.
blog1 (Java programming language):
http://blog.csdn.net/linhuanmars/article/details/20667175
Amazed that a person can work on algorithms problems and finish over 300 questions/year, people love algorithms and they must know the power of algorithms to save time and improve efficiency at work.
http://buttercola.blogspot.ca/search/label/Leetcode
http://buttercola.blogspot.ca/2014/09/leetcode-n-queens.html
Leetcode 314:
https://github.com/jianminchen/Leetcode_C-/blob/master/BinaryTreeVerticalOrderTraversal_314.java
Julia likes to work on the analysis of the algorithm, this pseudo code in the blog may help her quickly recover, from nervous to get familiar with the algorithm.
blog1 (Java programming language):
http://blog.csdn.net/linhuanmars/article/details/20667175
Amazed that a person can work on algorithms problems and finish over 300 questions/year, people love algorithms and they must know the power of algorithms to save time and improve efficiency at work.
http://buttercola.blogspot.ca/search/label/Leetcode
http://buttercola.blogspot.ca/2014/09/leetcode-n-queens.html
Leetcode 314:
https://github.com/jianminchen/Leetcode_C-/blob/master/BinaryTreeVerticalOrderTraversal_314.java
Julia likes to work on the analysis of the algorithm, this pseudo code in the blog may help her quickly recover, from nervous to get familiar with the algorithm.
The following blog is well-written, and Julia should write a similar solution using C#, to express her appreciation of good variables names, good analysis. (Rating: 10 from 1-10)
https://polythinking.wordpress.com/2013/02/27/leetcoden-queens-i-and-ii/
It is fun to read solutions in C++/Java.
Write another version of N-Queen problem in C# to entertain.
https://github.com/jianminchen/Leetcode_C-/blob/master/51NQueenProblem_B.cs
Good advice from the blog 1: 基本上大部分NP问题的求解都是用这个方式,比如Sudoku Solver,Combination Sum,Combinations,Permutations,Word Break II,Palindrome Partitioning等,所以只要把这个套路掌握熟练,多练习.
Feb. 2, 2016 It is also a DFS algorithm.
Feb. 2, 2016 It is also a DFS algorithm.
Tuesday, June 9, 2015
Leetcode: N puzzle queens
Read the blogs, and understand the algorithm first:

Given an integer n, return all distinct solutions to the n-queens puzzle.
Each solution contains a distinct board configuration of the n-queens’ placement, where
http://www.acmerblog.com/leetcode-solution-n-queens-6254.html
http://blog.csdn.net/feixiaoxing/article/details/6877965
and later, wrote the program using C#, share the code:
Algorithm: Eight puzzle queen
https://github.com/jianminchen/eightPuzzleQueen/blob/master/Program.csN-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzzle.
Each solution contains a distinct board configuration of the n-queens’ placement, where
'Q' and '.' both indicate a queen and an empty space respectively.http://www.acmerblog.com/leetcode-solution-n-queens-6254.html
http://blog.csdn.net/feixiaoxing/article/details/6877965
and later, wrote the program using C#, share the code:
Algorithm: Eight puzzle queen
https://github.com/jianminchen/Leetcode_C-/blob/master/51NQueenProblems.cs
January 12, 2016
Review the algorithm again. The following blog gives a good explanation, help me understand the algorithm better.
http://blog.csdn.net/linhuanmars/article/details/20667175
http://buttercola.blogspot.ca/search/label/Leetcode
http://yucoding.blogspot.ca/2013/01/leetcode-question-59-n-queens.html
https://polythinking.wordpress.com/2013/02/27/leetcoden-queens-i-and-ii/
It is fun to read solutions in C++/Java.
Subscribe to:
Posts (Atom)