随笔分类 -  Leetcode

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2019-02-12 23:31 Veritas_des_Liberty 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning 阅读全文
posted @ 2019-02-12 22:48 Veritas_des_Liberty 阅读(245) 评论(0) 推荐(0) 编辑
摘要:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2019-02-12 22:16 Veritas_des_Liberty 阅读(200) 评论(0) 推荐(0) 编辑
摘要:Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文
posted @ 2019-02-11 22:40 Veritas_des_Liberty 阅读(164) 评论(0) 推荐(0) 编辑
摘要:Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Example 2: Approach #1: DP. [C++] Analysis: status: match[s1L 阅读全文
posted @ 2019-02-11 22:13 Veritas_des_Liberty 阅读(227) 评论(0) 推荐(0) 编辑
摘要:Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Approach #1: DP. [C++] Analysis: status: nums[n] 阅读全文
posted @ 2019-02-11 21:26 Veritas_des_Liberty 阅读(212) 评论(0) 推荐(0) 编辑
摘要:Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f 阅读全文
posted @ 2019-02-09 00:29 Veritas_des_Liberty 阅读(187) 评论(0) 推荐(0) 编辑
摘要:On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is exactly one starting square. 2 represents the ending 阅读全文
posted @ 2019-02-08 23:23 Veritas_des_Liberty 阅读(349) 评论(0) 推荐(0) 编辑
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文
posted @ 2019-02-08 21:43 Veritas_des_Liberty 阅读(228) 评论(0) 推荐(0) 编辑
摘要:We are given N different types of stickers. Each sticker has a lowercase English word on it. You would like to spell out the given target string by cu 阅读全文
posted @ 2019-02-06 23:49 Veritas_des_Liberty 阅读(377) 评论(0) 推荐(0) 编辑
摘要:Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2019-02-06 23:04 Veritas_des_Liberty 阅读(235) 评论(0) 推荐(0) 编辑
摘要:A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
posted @ 2019-02-06 00:38 Veritas_des_Liberty 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Input: 2 Output: 91 Explanation: The answer shoul 阅读全文
posted @ 2019-02-05 23:32 Veritas_des_Liberty 阅读(250) 评论(0) 推荐(0) 编辑
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: I 阅读全文
posted @ 2019-02-05 23:02 Veritas_des_Liberty 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is 阅读全文
posted @ 2019-02-05 00:31 Veritas_des_Liberty 阅读(213) 评论(0) 推荐(0) 编辑
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文
posted @ 2019-02-04 23:58 Veritas_des_Liberty 阅读(253) 评论(0) 推荐(0) 编辑
摘要:Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja 阅读全文
posted @ 2019-02-03 00:08 Veritas_des_Liberty 阅读(341) 评论(0) 推荐(0) 编辑
摘要:Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2019-02-01 22:50 Veritas_des_Liberty 阅读(143) 评论(0) 推荐(0) 编辑
摘要:Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r 阅读全文
posted @ 2019-02-01 00:06 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0) 编辑
摘要:We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclid 阅读全文
posted @ 2019-01-31 22:50 Veritas_des_Liberty 阅读(438) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页