深圳奥統平

深圳奥統平

單例模式

GIT和SVN區別

編程題

用string 相加,不能用lib

兩個數組判斷,是否B屬於A的子類,有返回第一個數組的下標,無則返回-1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

pubilc Sting add(Sting numberA,String numberB){

}

system.out.println(add("123456789123456789123456789","123456789123456789123456789")); //24676895858588768055576705442138576768
system.out.println(add("1","2")); //3
system.out.println(add("A","1")); //ERROR

pubilc int sub(int A[],int B[]){

}

system.out.println(sub("{4,5,6,7,8}","{5,6}")); //return 1
system.out.println(sub("{4,5,6,7,8}","{5,4}")); //return -1
system.out.println(sub("{4,5,6,7,8}","{6,7,8}")); //return 2
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×