Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. ...
分类:
其他好文 时间:
2018-10-30 23:53:03
阅读次数:
208
模板通常用于产生HTML,但是Django的模板也能产生任何基于文本格式的文档。 用两个大括号括起来的文字(例如 {{ person_name }} )称为 变量 (variable) 。 被大括号和百分号包围的文本(例如 {% if ordered_warranty %} )是 模板标签 (tem ...
分类:
其他好文 时间:
2018-10-30 17:43:21
阅读次数:
196
https://leetcode.com/problems/number-of-longest-increasing-subsequence/discuss/107293/JavaC++-Simple-dp-solution-with-explanation 每次记载最大长度 然后最后遍历 把等于最 ...
分类:
其他好文 时间:
2018-10-30 11:20:50
阅读次数:
135
Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le ...
分类:
其他好文 时间:
2018-10-29 22:11:05
阅读次数:
200
? 书中第五章部分程序,包括在加上自己补充的代码,Trie 树类,Trie 集合,三值搜索树(Ternary Search Trie) ● Trie 树类 ● Trie 集合 ● 三值搜索树 ...
分类:
编程语言 时间:
2018-10-29 11:12:57
阅读次数:
133
1 class Solution { 2 public int longestValidParentheses(String s) { 3 if(s.length() == 0) return 0; 4 char[] arr = s.toCharArray(); 5 Stack stack = ne... ...
分类:
其他好文 时间:
2018-10-28 00:50:59
阅读次数:
163
1 class Solution { 2 public int findLengthOfLCIS(int[] nums) { 3 if(nums.length == 0) return 0; 4 if(nums.length == 1) return 1; 5 int[] dp = new int[... ...
分类:
其他好文 时间:
2018-10-28 00:49:29
阅读次数:
162
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: ...
分类:
其他好文 时间:
2018-10-27 23:37:05
阅读次数:
320
【题目】 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farth ...
分类:
其他好文 时间:
2018-10-26 10:36:02
阅读次数:
140
回文串 回文串(palindromic string)是指这个字符串无论从左读还是从右读,所读的顺序是一样的;简而言之,回文串是左右对称的。一般求解一个字符串的最长回文子串问题。 problem:Longest Palindromic Substring 参考 1.LongestPalindromi ...
分类:
其他好文 时间:
2018-10-25 11:16:17
阅读次数:
139