Tag Archives: DFS
Permutations – Python 3 (Week 19 – 03)
N-Queens – Python 3 (Week 19 – 02)
Solution 1 Time O(s*n^2). Space O(s). Solution 2 Improve time complexity to O(s*n). Because n is small, can not improve a lot.
Split String – Python 3 (Week 19 – 01)
Expression Add Operators – Python 3 (Week 17 – 20)
Word Pattern II – Python 3 (Week 17 – 08)
Sudoku Solver – Python 3 (Week 17 – 04)
Time O((9!)^9). Space O(81).
Word Pattern II – Python 3 (Week 17 – 03)
Time O(m^n). Space O(n + m).
Combination Sum II – Python 3 (Week 17 – 02)
Combination Sum – Python 3 (Week 17 – 01)
Time O(number of solutions * n).