Note: The size of the BST will not exceed 50. The BST is always valid and each node's value is different. Note: The size of the BST will not exceed 50 ...
分类:
其他好文 时间:
2019-10-18 16:05:04
阅读次数:
97
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate... ...
分类:
其他好文 时间:
2019-10-17 13:55:22
阅读次数:
69
Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you ...
分类:
其他好文 时间:
2019-10-16 23:20:06
阅读次数:
94
1 匹配首尾空格的正则表达式:(^\s*)|(\s*$) 2 整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$ 3 只能输入数字:"^[0-9]*$"。 4 只能输入n位的数字:"^\d{n}$"。 5 只能输入至少n位的数字:"^\d{n,}$"。 6 只能输入m~n位的数字:。"... ...
分类:
编程语言 时间:
2019-10-16 13:20:43
阅读次数:
468
问题描述 The "BFS" algorithm is defined as follows. 1. Consider an undirected graph with vertices numbered from 11 to n. Initialize q as a new "queue" con ...
分类:
其他好文 时间:
2019-10-15 00:18:26
阅读次数:
98
异常:Invalid character found in the request target. The valid characters are defined in RFC 3986 ...
分类:
其他好文 时间:
2019-10-13 20:44:39
阅读次数:
113
一般来讲,对一些post请求,我们可以使用@valid+javax.validation.constraints包下注解的方式,优雅把参数验证放在control层的requst中,举例说明如下图: 但是此时,如果我们知道可以修改的状态只能为枚举类中存在的值,并没有已有的注解可以用,我们可以采用以下代 ...
分类:
编程语言 时间:
2019-10-12 01:11:39
阅读次数:
1018
这是在Win10系统下,将Jar包手工导入进Maven本地仓库,使用PowerShell执行命令报的错。 命令如下: 原因是在PowerShell中,点 “.” 算特殊运算符,导致该错误。 解决方法一:在CMD中执行该命令。需要注意把当前目录转到pom.xml所在目录 解决方法二:为命令加上单引号, ...
分类:
编程语言 时间:
2019-10-09 23:58:45
阅读次数:
257
"POJ2676 Sudoku" 位运算 + 搜索。更好的优化方法:方案数最小的空格先填。 cpp include include int T, f[9], g[9], h[3][3]; char buf[10]; int v[9][9], tot; inline int lowbit(int x) ...
分类:
其他好文 时间:
2019-10-05 18:04:35
阅读次数:
84
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/valid-parentheses/ Given a string containing just the characters '( ...
分类:
其他好文 时间:
2019-10-04 23:20:46
阅读次数:
186