题目描述 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the ...
分类:
其他好文 时间:
2017-09-11 22:43:35
阅读次数:
107
2、在订阅方中导入我们公共的类,然后实例化一个订阅方的对象 3、在发布方中导入我们公共的类,然后实例化一个发布方的对象 ...
分类:
其他好文 时间:
2017-09-09 17:17:19
阅读次数:
335
在最近做的项目中,因为频繁用到网络请求,所以使用了现在比较流行的框架RxJava和Retrofit来代替之前的Okhttp的繁琐请求。 retrofit是用来做网络请求操作,RxJava是用来切换线程、转换数据操作的。 首先第一步,使用三方的框架,肯定是先添加依赖包。项目中用的Rxjava2.0、r ...
分类:
编程语言 时间:
2017-09-07 13:36:34
阅读次数:
174
问题描述 我使用angular2.0.0-beta.7。当组件在像”/path?query=value1″这样的路径上加载时,它被重定向到”/path”。为什么删除了GET参数?如何保留参数? 路由器出现错误。如果我有一条主路线 和我的孩子路线一样 我不能在TodoListComponent中获取参 ...
分类:
Web程序 时间:
2017-09-06 18:24:22
阅读次数:
441
Problem Description This is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. Input Each sequence is descr ...
分类:
其他好文 时间:
2017-09-05 14:43:21
阅读次数:
199
4.5.1 The singleton scope 4.5.1 The singleton scope Only one shared instance of a singleton bean is managed, and all requests for beans with an id or ...
分类:
其他好文 时间:
2017-09-05 01:36:12
阅读次数:
203
题目描述 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表。要求不能创建任何新的结点,只能调整树中结点指针的指向。 思路:迭代版本: 核心思想是中序遍历,头结点需要单独设置flag变量进行初始化。 if(!s.empty()){ if(flag == 1){ head = s.top(); ...
分类:
其他好文 时间:
2017-09-04 13:13:51
阅读次数:
213
题目描述 一个只包含'A'、'B'和'C'的字符串,如果存在某一段长度为3的连续子串中恰好'A'、'B'和'C'各有一个,那么这个字符串就是纯净的,否则这个字符串就是暗黑的。例如: BAACAACCBAAA 连续子串"CBA"中包含了'A','B','C'各一个,所以是纯净的字符串 AABBCCAA ...
分类:
其他好文 时间:
2017-09-04 00:00:45
阅读次数:
214
题目描述 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10. 思路:一定要记住循环继续的条 ...
分类:
其他好文 时间:
2017-09-03 00:22:24
阅读次数:
158
PSR-4 is something like 'relative path', PSR-0, 'absolute path'. e.g. config: PSR-0 autoload: PSR-4 autoload: And there are some more difference in de ...
分类:
其他好文 时间:
2017-09-02 16:58:57
阅读次数:
157