Area of a CircleDescription:Complete the functioncircleAreaso that it will return the area of a circle with the givenradius. Round the returned number...
分类:
其他好文 时间:
2015-07-05 18:25:40
阅读次数:
134
解法一:From top to bottom 1 int treeHeight(TreeNode *T) 2 { 3 if (T == NULL) 4 return 0; 5 6 return max(treeHeight(T->left), treeHei...
分类:
其他好文 时间:
2015-07-05 18:23:33
阅读次数:
82
Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].Credits:S...
分类:
其他好文 时间:
2015-07-05 18:15:24
阅读次数:
191
GO语言25个关键字的说明;var和const :变量和常量的声明var varName type 或者 varName : = valuepackage and import: 导入func: 用于定义函数和方法return :用于从函数返回defer someCode :在函数退出之前执行go ...
分类:
其他好文 时间:
2015-07-05 18:10:20
阅读次数:
141
让c++ 函数返回一个数组在c++中是不允许数组作为函数的返回值的int [] someFunction( ); //ILLEGAL要想实现函数返回一个数组,那返回对应数组里面类型的指针you must return a pointer to the array base type and have...
分类:
编程语言 时间:
2015-07-05 16:39:02
阅读次数:
188
1 int init_win() 2 { 3 return 1; 4 }; 5 6 int load_ext() 7 { 8 //显示记录时执行 9 // 10 return 1; 11 }; 12 13 int show_row_ext() 14 {...
分类:
其他好文 时间:
2015-07-05 16:37:57
阅读次数:
78
S1:js中一切皆对象,想想如果要实现对父对象属性和方法的继承,最初我们会怎样子来实现呢,考虑到原型的概念,最初我是这样来实现继承的function Parent(){ this.name='123';}Parent.prototype.getName=function(){ return ...
分类:
编程语言 时间:
2015-07-05 16:35:49
阅读次数:
104
具体的实例
Java文件
package com.weixuan.test;
public class MyTest {
private int age;
private String name;
public int getAge() {
return age;
}
public String getName() {
return name;
}
pu...
分类:
编程语言 时间:
2015-07-05 15:10:01
阅读次数:
181
shorter concat [reverse longer]Description:Given 2 strings,aandb, return a string of the form:shorter+reverse(longer)+shorter.In other words, the shor...
分类:
其他好文 时间:
2015-07-05 14:55:01
阅读次数:
101
题目:Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. Yo...
分类:
其他好文 时间:
2015-07-05 14:50:49
阅读次数:
104