139. Word Break

139. 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. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Example 1: Input: s = "leetcode", wordDict = ["leet","code"] Output: true Explanation: Return true because "leetcode" can be segmented as "leet code"....

<span title='2021-05-20 00:00:00 +0000 UTC'>May 20, 2021</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;volyx

91. Decode Ways

91. Decode Ways A message containing letters from A-Z can be encoded into numbers using the following mapping: ‘A’ -> “1” ‘B’ -> “2” … ‘Z’ -> “26” To decode an encoded message, all the digits must be grouped then mapped back into letters using the reverse of the mapping above (there may be multiple ways). For example, “11106” can be mapped into: “AAJF” with the grouping (1 1 10 6) “KJF” with the grouping (11 10 6) Note that the grouping (1 11 06) is invalid because “06” cannot be mapped into ‘F’ since “6” is different from “06”....

<span title='2021-05-20 00:00:00 +0000 UTC'>May 20, 2021</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;volyx