8-queen problem using Dynamic programming

后端 未结 2 530
情话喂你
情话喂你 2021-02-02 18:15

I am quite confused with idea of implementing 8-queen problem using dynamic programming. It seems it is not possible at one end as for DP \" if the problem was broken up into a

2条回答
  •  粉色の甜心
    2021-02-02 18:34

    Just posting the obvious google hit:

    A dynamic programming solution to the n-queens problem

    Note: this is still very slow for large n's, O ( f(n)*8^n), you better use some other algorithm:

    A Polynomial Time Algorithm for the N-Queens Problem

提交回复
热议问题