leetcode.com 2023-07-31
🟡712.minimum-ascii-delete-sum-for-two-strings
🏷️ Tags
#string #dynamic_programming
🟡712.minimum-ascii-delete-sum-for-two-strings
🏷️ Tags
#string #dynamic_programming
Telegraph
minimum-ascii-delete-sum-for-two-strings
Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Output: 231 Explanation: Deleting "s" from "sea" adds the ASCII value of "s" (115) to the sum. Deleting "t"…
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-04
🟡139.word-break
🏷️ Tags
#trie #memoization #array #hash_table #string #dynamic_programming
🟡139.word-break
🏷️ Tags
#trie #memoization #array #hash_table #string #dynamic_programming
Telegraph
word-break
Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words. Note that the same word in the dictionary may be reused multiple times in the segmentation. Example…
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.com 2023-08-06
🔴920.number-of-music-playlists
🏷️ Tags
#math #dynamic_programming #combinatorics
🔴920.number-of-music-playlists
🏷️ Tags
#math #dynamic_programming #combinatorics
Telegraph
number-of-music-playlists
Your music player contains n different songs. You want to listen to goal songs (not necessarily different) during your trip. To avoid boredom, you will create a playlist so that: