以java和erlang为例:①、java:面向对象 且 存在return。②、erlang:
函数性编程 不存在return%% 模拟检测 多个输入信息是否合理,只要有一个不合理,则返回。%%
举例:UName,UEmail,UPass,USex,UMoney,UOwn.%% 以上述描述的顺序为检...
分类:
编程语言 时间:
2014-05-19 10:27:08
阅读次数:
347
Question 1:Given an array of integers, find two
numbers such that they add up to a specific target number.The function twoSum
should return indices of...
分类:
其他好文 时间:
2014-05-19 09:35:41
阅读次数:
321
function yanzheng(val) { return
val.replace(/(^\s*)|(\s*$)/g, ""); }function Inputchecking() { var account =
document.getElementById("txt_ACCOUNT");.....
分类:
Web程序 时间:
2014-05-19 09:23:56
阅读次数:
237
Given a linked list, remove the nth node from
the end of list and return its head.For example,Given linked list:
1->2->3->4->5, and n = 2.After removi...
分类:
其他好文 时间:
2014-05-19 09:16:49
阅读次数:
247
Given an array of non-negative integers, you
are initially positioned at the first index of the array.Each element in the
array represents your maximu...
分类:
其他好文 时间:
2014-05-19 08:23:07
阅读次数:
223
Given an array of non-negative integers, you
are initially positioned at the first index of the array.Each element in the
array represents your maximu...
分类:
其他好文 时间:
2014-05-19 08:07:26
阅读次数:
288
void quickSort(int *a1 , int *a2){ int i=0 ,
j=a2-a1-1; if (i>=j) return; swap(a1[0] , a1[rand()%j+1]); while( ia1[0])
--j; if(i<j)...
分类:
其他好文 时间:
2014-05-19 07:43:47
阅读次数:
213
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-05-18 20:30:16
阅读次数:
301
#include int main(void){ printf("hello
cnblogs!\n"); return 0;}
分类:
其他好文 时间:
2014-05-18 19:50:02
阅读次数:
245
package main import ("fmt")//对象定义type Rect
struct{x,y float64width ,height float64} //对象方法实现func (r *Rect)
Area()float64{return r.width*r.height}//Go语...
分类:
其他好文 时间:
2014-05-18 19:36:55
阅读次数:
405