Backtracking

1.

Letter Combinations of a Phone Number (Medium)

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

A mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.

# 1(---) 2(abc) 3(def) # 4(ghi) 5(jkl) 6(mno) # 7(pqrs) 8(tuv) 9(wxyz)

2.

Combinations (Medium)

Given two integers n and k, return all possible combinations of k numbers chosen from the range [1, n].

You may return the answer in any order.

Note that combinations are unordered, i.e., [1,2] and [2,1] are considered to be the same combination.

3.

Permutations (Medium)

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

4.

Combination Sum (Medium)

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order.

The same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one of the chosen numbers is different.

5.

Generate Parentheses (Medium)

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

6.

Word Search (Medium)

Given an m x n grid of characters board and a string word, return true if word exists in the grid.

The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.