Leetcode--回溯法常考算法整理 Preface Leetcode--回溯法常考算法整理 Definition Why & When to Use Backtrakcing How to Use Backtracking Leetcode Problems N-Queens Permutations II Combinations Sudoku Solver Definition First, let's see the definition of backtracking given b…
BFS与DFS常考算法整理 Preface BFS(Breath-First Search,广度优先搜索)与DFS(Depth-First Search,深度优先搜索)是两种针对树与图数据结构的遍历或搜索算法,在树与图相关算法的考察中是非常常见的两种解题思路. BFS与DFS常考算法整理 Definition of DFS and BFS How to Implement DFS and BFS DFS How to explore as far as possible How to backt…