Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-10-16 08:40:12
阅读次数:
131
数字的比较:-eq 相等(equal)-ne 不等(not equal)-gt 大于(greater than)-lt 小于(less than)-ge 大于等于 (greater than or equal)-le 小于等于 (less than or equal)eg:if [ $max -g....
分类:
系统相关 时间:
2014-10-14 14:43:45
阅读次数:
280
[leetcode]Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x....
分类:
其他好文 时间:
2014-10-14 11:44:49
阅读次数:
140
今天看thinking in java , 看到讲equal和==的区别。但是了解的比较片面,只是知道equal比较内容,==比较地址。今天才发现原来Object类的equal也是用==实现的,比较的内容也是内存地址。只有那些重写覆盖了的equal方法才可能是比较的内容。
下面是找到的一些更详细的讲解,摘录下来,增强记忆。
java中的数据类型,可分为两类:
1.基本数据类型,也称原始数据类...
分类:
编程语言 时间:
2014-10-12 20:36:18
阅读次数:
255
首先看看下面的图,看清楚了图咱们要说的知识点也就说说清楚了一半
int a=10;
String b="ss";
String c=new String("kkk");
Person d=new Person("dlf");
String e=new String("kkk");
String f="ss";
jvm中有堆heap,栈stack,常量池constant...
分类:
其他好文 时间:
2014-10-10 19:14:44
阅读次数:
219
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements fro...
分类:
其他好文 时间:
2014-10-09 15:58:28
阅读次数:
232
问题: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identic...
分类:
其他好文 时间:
2014-10-07 17:55:43
阅读次数:
127
DescriptionThe Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the ...
分类:
其他好文 时间:
2014-10-07 13:38:23
阅读次数:
169
1. Arbitrary multi parameters funcssum(1,2,3,4,5) = sum(1 to 5: _*)the equal '=' can be ignored if there is none return val1 def sum(args: Int*) = {2 ...
分类:
其他好文 时间:
2014-10-07 00:25:22
阅读次数:
285
1、 仿函数
仿函数又名函数对象,具有函数性质的对象,就是传入一些参数,然后对参数进行某些运算,然后返回一个值。为了能够使行为类似函数,需要在类别定义中必须自定义function call 运算子operator()。
仿函数有如下几类:算术类仿函数(plus、minus)关系运算类仿函数(equal_to、less)逻辑运算类仿函数(logical_and、logical_or、logica...
分类:
其他好文 时间:
2014-10-06 16:42:50
阅读次数:
231