有效括号的嵌套深度。题意是给一个用字符串表示的嵌套括号,请按规则返回这个字符串的嵌套深度depth。嵌套深度的定义如下, depth("") = 0 depth(A + B) = max(depth(A), depth(B)), where A and B are VPS's depth("(" + ...
分类:
其他好文 时间:
2020-04-01 09:18:51
阅读次数:
87
输入一个链表,按链表从尾到头的顺序返回一个ArrayList。 import java.util.Stack; import java.util.ArrayList; public class Solution { public ArrayList<Integer> printListFromTai ...
分类:
其他好文 时间:
2020-04-01 01:10:22
阅读次数:
68
包装类 什么是包装类? 包装类其实就是把一个基本数据类型包装成为一个对象,。 为什么要用包装类? 包装类更加的方便我们进行数据的操作。 |基本类型|包装类| |: |: | |byte|Byte| |short|Short| |int|Integer| |long|Long| |float|Floa ...
分类:
编程语言 时间:
2020-04-01 01:01:27
阅读次数:
67
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each va ...
分类:
其他好文 时间:
2020-04-01 00:34:43
阅读次数:
61
1.当static关键字修饰局部变量时,只会初始化一次且在程序中只有一份内存; @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor ...
分类:
其他好文 时间:
2020-03-31 22:32:59
阅读次数:
80
地址:https://leetcode-cn.com/problems/string-to-integer-atoi/ <?php /** 请你来实现一个 atoi 函数,使其能将字符串转换成整数。 首先,该函数会根据需要丢弃无用的开头空格字符,直到寻找到第一个非空格的字符为止。 当我们寻找到的第一 ...
分类:
其他好文 时间:
2020-03-31 21:01:36
阅读次数:
62
题目描述查看:https://leetcode-cn.com/problems/combination-sum/ 题目的意思是从一个给定的数组中,选出一些数,这些数的和是target。 1.回溯法 思路 回溯法有2个关键点,一个是已经选的数,另一个是还能选哪些数。 创建一个List<Integer> ...
分类:
其他好文 时间:
2020-03-31 10:43:56
阅读次数:
64
https://blog.csdn.net/MR_L_0927/article/details/84784482 简单的方法是 直接在Controller内的接口参数前加上校验注解(@NotBlank...等),此时需在类上加注解 @Validated即可.当校验参数过多,这种方法使接口参数看起来过 ...
分类:
编程语言 时间:
2020-03-31 10:40:47
阅读次数:
177
2维的热度图 imagesc imagesc(x, y, z),x和y分别是横纵坐标,z为值,表示颜色 1 imagesc(theta,phi,slc); colorbar 2 xlabel('theta(°)','fontname','Times New Roman','FontSize',14) ...
分类:
其他好文 时间:
2020-03-31 01:28:38
阅读次数:
97
import tensorflow as tf FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string("captcha_dir", "./tfrecords", "验证码数据路径") tf.app.flags.DEFINE_integer("ba ...
分类:
其他好文 时间:
2020-03-31 01:26:27
阅读次数:
73