Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:
其他好文 时间:
2018-03-03 18:22:58
阅读次数:
153
[抄题]: 给定一个整数数组,在该数组中,寻找三个数,分别代表三角形三条边的长度,问,可以寻找到多少组这样的三个数来组成三角形? [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): ...
分类:
其他好文 时间:
2018-03-03 17:04:09
阅读次数:
95
https://leetcode.com/problems/validate-binary-search-tree/description/Given a binary tree, determine if it is a valid binary search tree (BST).Assume ... ...
分类:
其他好文 时间:
2018-03-02 12:19:44
阅读次数:
140
1.题目分析 Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are fil ...
分类:
其他好文 时间:
2018-03-02 01:11:25
阅读次数:
226
题意: 给定一棵树,任意选定两个节点(也可以是同一个节点),使这两个点和连接这两个点的路径上的点中最大值和最小值小于d 题解: 依次选定每一个节点并假设它是根节点(这棵树不一定是二叉树),同时假定根节点的值最大。从根节点开始遍历子节点,每一个子节点要满足以下性质: 子节点的值 ...
分类:
其他好文 时间:
2018-03-01 00:36:44
阅读次数:
107
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont ...
分类:
其他好文 时间:
2018-02-28 10:36:39
阅读次数:
164
1. is_valid如果返回值如果为真 证明验证成功 意味着self.is_bound为True 和 self.errors为False def is_valid(self): return self.is_bound and not self.errors 1).那么self.is_bound什... ...
分类:
其他好文 时间:
2018-02-27 21:16:56
阅读次数:
189
题目:Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this in ...
分类:
编程语言 时间:
2018-02-27 16:02:34
阅读次数:
157
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:
其他好文 时间:
2018-02-25 19:13:20
阅读次数:
143
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e ...
分类:
其他好文 时间:
2018-02-25 19:06:11
阅读次数:
175