All Posts

Leetcode 17: Letter Combinations of a Phone Number

Given a string of digits, return all possible letter combinations that the digits could represent based on the phone’s number-to-letter mapping.

Leetcode 22: Generate Parentheses

Given a number ’n’, find all possible combinations of ’n’ pairs of parentheses that are balanced and well-formed.

Leetcode 39: Combination Sum

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 can 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.

Leetcode 40: Combination Sum II

You are given a collection of distinct candidate numbers and a target number. Your task is to find all unique combinations of the candidate numbers that sum up to the target. Each number in the candidates list may only be used once in each combination. The solution should exclude duplicate combinations.

Leetcode 46: Permutations

Given a list of distinct integers, generate and return all possible permutations of the elements. The result can be returned in any order.

Leetcode 47: Permutations II

Given a collection of numbers that may contain duplicates, generate and return all possible unique permutations of the numbers.