Find All Permutations
Medium
Return all possible permutations of a given array of unique integers. They can be returned in any order.
Example:
Input: nums = [4, 5, 6]
Output: [[4, 5, 6], [4, 6, 5], [5, 4, 6], [5, 6, 4],
[6, 4, 5], [6, 5, 4]]
Find All Subsets
Medium
Return all possible subsets of a given set of unique integers. Each subset can be ordered in any way, and the subsets can be returned in any order.
Example:
Input: nums = [4, 5, 6]
Output: [[], [4], [4, 5], [4, 5, 6], [4, 6], [5], [5, 6], [6]]
N Queens
Hard
There is a chessboard of size n x n. Your goal is to place n queens on the board such that no two queens attack each other. Return the number of distinct configurations where this is possible.
Example:

Input: n = 4
Output: 2
Combinations of a Sum
Medium
Given an integer array and a target value, find all unique combinations in the array where the numbers in each combination sum to the target. Each number in the array may be used an unlimited number of times in the combination.
Example:
Input: nums = [1, 2, 3], target = 4
Output: [[1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2]]
Constraints:
- All integers in nums are positive and unique.
- The target value is positive.
- The output must not contain duplicate combinations. For example,
[1, 1, 2]and[1, 2, 1]are considered the same combination.
Phone Keypad Combinations
Medium
You are given a string containing digits from 2 to 9 inclusive. Each digit maps to a set of letters as on a traditional phone keypad:
| 1 | 2abc | 3def |
| 4ghi | 5jkl | 6mno |
| 7pqr | 8stu | 9wxyz |
Return all possible letter combinations the input digits could represent.
Example:
Input: digits = '69'
Output: ['mw', 'mx', 'my', 'mz', 'nw', 'nx', 'ny', 'nz', 'ow', 'ox', 'oy', 'oz']