Backtracking

Closest Dessert Cost

LeetCode problem #1774

Recursion & Backtracking

Master recursive problem solving, backtracking, and exploring all solution possibilities.

All Paths From Source to Target

Find all possible paths from source node to target node in a directed acyclic graph (DAG)

Combination Sum

Given an array of distinct integers and a target, return all unique combinations where the chosen numbers sum to target (elements may be reused)

Generate Permutations

Generate all possible permutations of a given string.

Jump Game

Determine if you can reach the last index of an array where each element represents the maximum jump length from that position

N-Queens

Place n queens on an n x n chessboard such that no two queens attack each other, and return all distinct solutions

Permutations

Given an array of distinct integers, return all the possible permutations in any order

Print All Root-to-Leaf Paths

Print all root-to-leaf paths in a binary tree

Subsets

Given an integer array of unique elements, return all possible subsets (the power set)

Word Break

Determine if a string can be segmented into space-separated words from a dictionary.

Word Break II (LC 140) — DFS + Memo DP (Hard)

Solve LeetCode 140 Word Break II with DFS + memoization DP. Output-sensitive (≈O(n²)+answers). Step-by-step for interviews—practice now.

Word Search

Given an m x n grid of characters and a string word, return true if the word exists in the grid by traversing adjacent cells without reusing any cell