51. N-Queens

2020-08-15  本文已影响0人  xxxcoder

algo1

dfs + 回溯
利用每行至多只有一个queen的特点,回溯内部只迭代column,回溯函数迭代row index

上一篇 下一篇

猜你喜欢

热点阅读