Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 3.35 KB

backtracking.md

File metadata and controls

48 lines (27 loc) · 3.35 KB

Backtracking LeetCode Problems

A collection of LeetCode problems solved using Backtracking pattern techniques, explanations, and complexity analysis.

Problems

Easy

# Problem Language Time Space Explanation
1920 Build Array from Permutation C++ O(n) O(1) Explanation

Medium

# Problem Language Time Space Explanation
17 Letter Combinations of a Phone Number JavaScript O(n) O(1) Explanation

| 31 | Next Permutation | Python | O(n) | O(1) | Explanation |

| 39 | Combination Sum | Python | O(n) | O(1) | Explanation |

| 40 | Combination Sum II | Python | O(n) | O(1) | Explanation |

| 46 | Permutations | Python | O(n) | O(1) | Explanation |

| 47 | Permutations II | Python | O(n) | O(1) | Explanation |

| 77 | Combinations | PHP | O(n) | O(1) | Explanation |

| 216 | Combination Sum III | JavaScript | O(n) | O(1) | Explanation |

| 1409 | Queries on a Permutation With Key | JavaScript | O(n) | O(1) | Explanation |

| 3577 | Count the Number of Computer Unlocking Permutations | Python | O(n) | O(1) | Explanation |

| 3720 | Lexicographically Smallest Permutation Greater Than Target | C++ | O(n) | O(1) | Explanation |

Hard

# Problem Language Time Space Explanation
60 Permutation Sequence Python O(n) O(1) Explanation

| 3116 | Kth Smallest Amount With Single Denomination Combination | Java | O(n) | O(1) | Explanation |

| 3734 | Lexicographically Smallest Palindromic Permutation Greater Than Target | Java | O(n) | O(1) | Explanation |