Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: 题意 给定一个没加点的IP地址,返回所有可能的合法IP地址。 思路: ...
分类:
其他好文 时间:
2019-06-01 09:49:58
阅读次数:
93
Given a binary tree, determine if it is a valid binary search tree (BST). Given a binary tree, determine if it is a valid binary search tree (BST). As ...
分类:
其他好文 时间:
2019-05-31 11:59:32
阅读次数:
101
[LeetCode] Longest Substring Without Repeating Characters 最长无重复字符的子串 Given a string, find the length of the longest substring without repeating charac ...
分类:
编程语言 时间:
2019-05-30 01:18:05
阅读次数:
106
[LeetCode] 5. Longest Substring Without Repeating Characters Given a string s, find the longest palindromic substring in s. You may assume that the ma ...
分类:
其他好文 时间:
2019-05-29 16:30:47
阅读次数:
86
后端 1. Spring自带的MD5加密工具类 2. 数据库的字段名不要含有 is 比如数据库有个字段为is_valid,那么到代码里这个变量为isValid。如果恰好这个变量是Boolean类型的,那么如果返回数据到前端,那么json串为{"valid":true},可以看见is被无形去掉了。 看 ...
分类:
其他好文 时间:
2019-05-28 17:06:51
阅读次数:
110
1、在需要校验的参数名上面添加注解 2、在web层接收参数(参数前面使用@Valid进行标记,后面必须紧跟参数bindingResult,存储参数的错误信息) 3、使用aop进行校验信息统一处理 ...
分类:
其他好文 时间:
2019-05-27 11:58:07
阅读次数:
869
给定一个只包含括弧的字符串,判断其括弧规则是否合法。
分类:
编程语言 时间:
2019-05-27 10:39:29
阅读次数:
102
941. 有效的山脉数组 941. Valid Mountain Array 题目描述 给定一个整数数组 A,如果它是有效的山脉数组就返回 true,否则返回 false。 让我们回顾一下,如果 A 满足下述条件,那么它是一个山脉数组: A.length = 3 在 0 A[i+1] ... A[B ...
分类:
编程语言 时间:
2019-05-24 23:51:34
阅读次数:
138
少考虑了1 多考虑了重复括号,和括号有数学运算符顺序: Runtime: 924 ms, faster than 5.87% of Python3 online submissions for Valid Parentheses. Memory Usage: 13.3 MB, less than 1 ...
分类:
其他好文 时间:
2019-05-24 19:32:32
阅读次数:
110