2017年第十五屆走美杯初賽初二備考試題
英文筆試題

1. tranlation (mandatory)
cdma venders have worked hard to give cdma roaming capabilities via the de
velopment of ruim-essentially, a sim card for cdma handsets currently being de
ployed in china for new cdma operator china unicom. korean cellco ktf demonstr
ated earlier this year the ability to roam between gsm and cdma using such car
ds.however,only the card containing the user’s service data can roam-not the
cdma handset or the user’s number (except via call forwarding).
2. programming (mandatory)
linked list
a. implement a linked list for integers,which supports the insertafter (in
sert a node after a specified node) and removeafter (remove the node after a s
pecified node) methods;
b. implement a method to sort the linked list to descending order.
3. debugging (mandatory)
a. for each of the following recursive methods,enter y in the answer box i
f themethod terminaters (assume i=5), otherwise enter n.
static int f(int i){
return f(i-1)*f(i-1);
}
ansewr:
static int f(int i){
if(i==0){return 1;}
else {return f(i-1)*f(i-1);}
}
ansewr:
static int f(int i){
if(i==0){return 1;}
else {return f(i-1)*f(i-2);}
}
ansewr:
b. there are two errors in the following java program:
static void g(int i){
if(i==1){return;}
if(i%2==0){g(i/2);return;}
else {g(3*i);return;}
}
【第十五屆走美杯初賽初二備考試題】相關文章:
2017第十五屆走美杯初賽初一備考試題02-14
2017第十五屆走美杯初賽五年級備考題05-16
2017第十五屆走美杯初賽六年級備考題09-25
2017第十五屆走美杯初賽四年級備考題03-05
2017第十五屆走美杯初賽三年級備考題11-09
2017第十五屆走美杯初賽六年級備戰真題03-23
2017年第15屆走美杯考試范圍介紹05-12
- 相關推薦