• ## [recursion and recursion] n queen problem, prime ring

Time：2021-8-24

n-queens problem N queens are placed on the n * n checkerboard so that they do not attack each other (that is, any two queens are not allowed to be in the same row, the same column, or on the slash at a 45 angle with the checkerboard border).Your task is to find out how […]

• ## Data structures and algorithms: an introduction to greedy algorithms

Time：2021-8-13

This tutorial outlines and explains greedy algorithms with easy to understand code and information diagrams. You will soon become a professional! 1. Prefix tree 1.1 description Prefix tree is related to greedy algorithm; Let’s not talk about relationships. Prefix tree, also known as trie and word search tree, is a tree structure used to store […]

• ## Analysis and Realization of eight queens problem

Time：2021-4-15

Eight queens problem Eight queens problem is an old and famous problem, which is a typical case of backtracking algorithm. In 1848, the chess player Max Bessel put forward the question: put eight queens on the 8 × 8 space chess, so that they can’t attack each other, that is: any two Queens can’t be […]

• ## Eight queens problem — recursive backtracking

Time：2021-1-30

1. Eight queens Put eight queens on the 8 × 8 chessboard so that they can’t attack each other, that is, any two Queens can’t be in the same row, the same column or the same diagonal line. How many kinds of pendulum are there. 2. Ideas This problem is very suitable to be solved […]

• ## Week 19 of Arts | leetcode 51 n queen question | how to avoid over design of software system

Time：2020-9-29

ARTS Arts is an activity launched by Chen Hao in the geek time column. The aim is to keep learning through sharing. Each person writes arts once a week: algorithm is an algorithm problem, review is to read an English article, technique / tips is to share a small technology, share is to share a […]

• ## 51. N queen

Time：2020-4-2

The n-queen problem studies how to place n queens on N × n chessboard and make them unable to attack each other. The figure above shows a solution to the 8 queen problem. Given an integer n, the solution of all the different N queens problem is returned. Each solution contains a clear chess placement […]

• ## 52. N Queen II

Time：2020-4-1

The n-queen problem studies how to place n queens on N × n chessboard and make them unable to attack each other. The figure above shows a solution to the 8 queen problem. Given an integer n, returns the number of different solutions for Queen n. Example: Input: 4Output: 2Explanation: 4 there are two different […]

• ## Eight queens problem of classical algorithm

Time：2020-1-16

The eight queens problem is an old and famous problem, which is a classic case of learning backtracking algorithm. Let’s explore it together today! Back in 1848, international chess player Max Bethel raised such a question, Put eight queens on the 8 × 8 grid chess, so that they can’t attack each other, that is, […]