leetcode.com 2023-08-03
🟡17.letter-combinations-of-a-phone-number
🏷️ Tags
#hash_table #string #backtracking
🟡17.letter-combinations-of-a-phone-number
🏷️ Tags
#hash_table #string #backtracking
Telegraph
letter-combinations-of-a-phone-number
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…
leetcode.com 2023-08-05
🟡95.unique-binary-search-trees-ii
🏷️ Tags
#tree #binary_search_tree #dynamic_programming #backtracking #binary_tree
🟡95.unique-binary-search-trees-ii
🏷️ Tags
#tree #binary_search_tree #dynamic_programming #backtracking #binary_tree
Telegraph
unique-binary-search-trees-ii
Given an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Return the answer in any order. Example 1: Input: n = 3 Output: [[1,null,2,null,3],[1,null,3,2],[2,1,3],[3,1,null…
leetcode.cn 2023-12-09
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#math #backtracking #enumeration
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#math #backtracking #enumeration
Telegraph
next-greater-numerically-balanced-number
如果整数 x 满足:对于每个数位 d ,这个数位 恰好 在 x 中出现 d 次。那么整数 x 就是一个 数值平衡数 。 给你一个整数 n ,请你返回 严格大于 n 的 最小数值平衡数 。 示例 1: 输入:n = 1 输出:22 解释: 22 是一个数值平衡数,因为: - 数字 2 出现 2 次 这也是严格大于 1 的最小数值平衡数。 示例 2: 输入:n = 1000 输出:1333 解释: 1333 是一个数值平衡数,因为: - 数字 1 出现 1 次。 - 数字 3 出现 3 次。 这也是严格大于…
leetcode.cn 2024-01-04
🟡2397.maximum-rows-covered-by-columns
🏷️ Tags
#bit_manipulation #array #backtracking #enumeration #matrix
🟡2397.maximum-rows-covered-by-columns
🏷️ Tags
#bit_manipulation #array #backtracking #enumeration #matrix
Telegraph
maximum-rows-covered-by-columns
给你一个下标从 0 开始、大小为 m x n 的二进制矩阵 matrix ;另给你一个整数 numSelect,表示你必须从 matrix 中选择的 不同 列的数量。 如果一行中所有的 1 都被你选中的列所覆盖,则认为这一行被 覆盖 了。 形式上,假设 s = {c1, c2, ...., cnumSelect} 是你选择的列的集合。对于矩阵中的某一行 row ,如果满足下述条件,则认为这一行被集合 s 覆盖:
leetcode.com 2024-01-23
🟡1239.maximum-length-of-a-concatenated-string-with-unique-characters
🏷️ Tags
#bit_manipulation #array #string #backtracking
🟡1239.maximum-length-of-a-concatenated-string-with-unique-characters
🏷️ Tags
#bit_manipulation #array #string #backtracking
Telegraph
maximum-length-of-a-concatenated-string-with-unique-characters
You are given an array of strings arr. A string s is formed by the concatenation of a subsequence of arr that has unique characters. Return the maximum possible length of s. A subsequence is an array that can be derived from another array by deleting some…