Git Product home page Git Product logo

8-queen-problem-php's Introduction

8-queen-problem-php

This program contains one solution for 8 queen problem. However 8 queen problem contains 92 complete solutions . The 8 queens problem has 92 solutions. The condition for the 8 queens problems is: No two queens threaten each other; thus, a solution requires that no two queens share the same row, column, or diagonal.

 In this program I used backtracking algorithm to find the solution for 8 queens problem . 
 The backtracking algorithm will tracks the all possible ways and returns the best possible way to place the queen.
 	1. It will check is there any queen placed on its horizontal or vertical sides
 	2. Then checks the left upper diagonal .
 	3. Then it will checks the left lower diagonal .
 	4. If all the conditions were true, it will place the queen in particular place.
 	5. Else, it will return false .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.