广东北电面试题Word文档格式.docx
《广东北电面试题Word文档格式.docx》由会员分享,可在线阅读,更多相关《广东北电面试题Word文档格式.docx(39页珍藏版)》请在冰豆网上搜索。
public:
LinkList();
~LinkList();
boolInsertAfter(intafternode,intdata);
//插入
boolRemoveAfter(intremovenode);
//删除
voidsort();
//排序
};
实现方法
//insertanodeafteraspecifiednode
boolLinkList:
:
InsertAfter(intafternode,intdata)
LNode*pTemp=m_pList;
intcurPos=-1;
if(afternode>
m_listLength)//插入点超过总长度
{
returnfalse;
}
while(pTemp!
=NULL)//找到指定的节点
curPos++;
if(curPos==afternode)
break;
pTemp=pTemp->
next;
if(curPos!
=afternode)//节点未寻到,错误退出
LNode*newNode=newLNode;
//将新节点插入指定节点后
newNode->
data=data;
next=pTemp->
pTemp->
next=newNode;
m_listLength++;
returntrue;
}
//removethenodeafteraspecifiednode
RemoveAfter(intremovenode)
intcurPos=-1;
if(removenode>
m_listLength)//删除点超过总长度
//找到指定的节点后一个节点,因为删除的是后一个节点
=NULL)
if(curPos==removenode+1)
=removenode)//节点未寻到,错误退出
LNode*pDel=NULL;
//删除节点
pDel=pTemp->
next=pDel->
deletepDel;
m_listLength--;
//sortthelinkedlisttodescendingorder.
voidLinkList:
sort()
if(m_listLength<
=1)
return;
inttemp;
//选择法排序
for(inti=0;
i<
m_listLength-1;
i++)
for(intj=i+1;
j<
m_listLength;
j++)
if(pTemp[i].data<
pTemp[j].data)
temp=pTemp[i].data;
pTemp[i].data=pTemp[j].data;
pTemp[j].data=temp;
前两个函数实现了要求a,后一个函数sort()实现了要求b
3.Debugging(Mandatory)
a.Foreachofthefollowingrecursivemethods,enterYintheanswerboxifthemethodterminaters(assumei=5),OtherwiseenterN.
(题目意思:
判断下面的递归函数是否可以结束)
staticintf(inti){
returnf(i-1)*f(i-1);
Ansewr:
N,明显没有返回条件语句,无限递归了
if(i==0){return1;
else{returnf(i-1)*f(i-1);
Y,当i=0时可结束递归
else{returnf(i-1)*f(i-2);
N,因为i=1时,f(i-2)=f(-1),进入一个无限递归中
b.TherearetwoerrorsinthefollowingJAVAprogram:
staticvoidg(inti){
if(i==1){return;
if(i%2==0){g(i/2);
return;
else{g(3*i);
pleasecorrectthemtomakesurewecangettheprinted-outresultasbelow:
3105168421
在第一个if语句前加 System.out.print(i+"
"
);
else里面的g(3*i)改为g(3*i+1)
该题由网友alvin补上,我不熟java。
谢谢他。
----------------------------------------------
又到广告时间:
版权所有:
朱科欢迎光临我的网站:
,各位转贴别删,劳动成果啊
中文笔试题
1.汉译英
北电网络的开发者计划使来自于不同组织的开发者,能够在北电网络的平台上开发圆满的补充业务。
北电网络符合工业标准的开放接口,为补充业务的开展引入了无数商机,开发者计划为不同层面的开发者提供不同等级的资格,资格的划分还考虑到以下因素:
补充业务与北电网络平台的集合程度,开发者团体与北电网络的合作关系,等等。
这个这个基本上还是不现丑了吧。
2.编程
将整数转换成字符串:
voiditoa(int,char);
例如itoa(-123,s[])则s=“-123”;
char*itoa(intvalue,char*string)
chartmp[33];
char*tp=tmp;
inti;
unsignedv;
char*sp;
//将值转为正值
if(value<
0)
v=-value;
else
v=(unsigned)value;
//将数转换为字符放在数组tmp中
while(v)
i=v%10;
v=v/10;
*tp++=i+'
0'
;
//将tmp里的字符填入string指针里,并加上负号(如果有)
sp=string;
*sp++='
-'
while(tp>
tmp)
*sp++=*--tp;
*sp=0;
returnstring;
英文笔试题
1.Tranlation(Mandatory)
CDMAvendershaveworkedhardtogiveCDMAroamingcapabilitiesviathedevelopmentofRUIM-essentially,aSIMcardforCDMAhandsetscurrentlybeingdeployedinChinafornewCDMAoperatorChinaUnicom.KoreancellcoKTFdemonstratedearlierthisyeartheabilitytoroambetweenGSMandCDMAusingsuchcards.However,onlythecardcontainingtheuser’sservicedatacanroam-nottheCDMAhandsetortheuser’snumber(exceptviacallforwarding).
2.Programming(Mandatory)
Linkedlist
b.Implementamethodtosortthelinkedlisttodescendingorder.
3.Debugging(Mandatory)
a.Foreachofthefollowingrecursivemethods,enterYintheanswerboxifthemethodterminaters(assumei=5),OtherwiseenterN.
staticintf(inti){
returnf(i-1)*f(i-1);
}
Ansewr:
if(i==0){return1;
}
else{returnf(i-1)*f(i-1);
else{returnf(i-1)*f(i-2);
b.TherearetwoerrorsinthefollowingJAVAprogram:
staticvoidg(inti){
if(i==1){return;
if(i%2==0){g(i/2);
else{g(3*i);
pleasecorrectthemtomakesurewecangettheprinted-outresultasbelow:
3105168421
中文笔试题
1.汉译英
2.编程
例如itoa(-123,s[])则s=“-123”;
网易
1、10个人分成4组有几种分法?
2、如图:
78910
61211
54312
16151413
设“1”的坐标为(0,0)“7”的坐标为(-1,-1)编写一个小程序,使程序做到输入坐标(X,Y)之后显示出相应的数字。
3、#include<
stdio.h>
//exampleinputandoutput
//in123out131
//in1234567892100out12345678910021
longmex(longa,longb,longc)
{longd;
if(b==0)return0;
if(b==1)returna%c;
d=mex(a,b/2,c);
d*=d;
这里忘了;
d*=mex(a,b%2,c);
d%=c;
returnd;
}
intmain(void)
{longx,y,z;
while
(1)
{if(scanf(%d%d%d,&
x,&
y,&
z)>
3)return0;
if(x<
0){printf("
toosmall"
continue;
if(y<
if(z<
1){printf("
if(y>
z){printf("
toobig"
if(z>
1000000010){printf("
continue}
printf(%d%d%d,x,z,mex(x,y,z);
}}
根据这个程序,当已知一个输入,算出输出,如:
输入131则输出123输入12345678910021输出1234567892100
有了保底offer,本来说是去bs北电的,结果发现还是被它bs了.没多少面经可言,基础很重要,自信很重要.直接发题目吧.
1.英语介绍,然后随机问了些问题,比如为什么加入北电,为什么不去华为.
2.下面是中文.项目介绍.
3.有哪些编程经验.
4.七层网络协议,什么叫会话层,那表示层呢?
你知道哪个协议是表示层的?
简单介绍下随路信令.
5.数据结构熟悉哪些排序算法?
快速排序需要哪些额外的开销?
什么叫深度优先和广度优先.
32位机一次最多可以读多少数据?
如果要超过这么多怎么办?
函数调用压栈是压哪些内容?
需不需要压寄存器?
(确实没听说过,然后他说你没有深入到c内部或者底层?
)
6.如果老板要你去买一辆汽车,你怎么实施?
(后来打断我说从软件工程角度说)需求分析的output是什么?
对老板的要求怎么排序?
如果其他条件符合要求,但是budget超出,如何处理?
7.职业规划是什么?
第一份工资打算怎么办?
本文来源于UNUS.CN(),原文地址:
这一周真可谓笔试周,北电,爱立信,思科等公司的笔试全都集中在这一周了。
在网上找到了一些历年的各个公司的笔试试题,不过大都只有题目没有答案。
sigh,只好自己做作业了~~
先贴北电的吧。
先声明:
这些仅代表个人观点,并非标准答案。
贴上来,供大家共享、参考与交流。
欢迎大家补充指正。
祝愿大家找工顺利。
尽快拿到自己梦寐已久的offer,然后。
。
然后BG我啦,哈哈
历年广东北电校园招聘笔试试题及答案
CDMAvendershaveworkedhardtogiveCDMAroamingcapabilitiesviathedevelopmentofRUIM-essentially,aSIMcardforCDMAhandsetscurrentlybeingdeployedinChinafornewCDMAoperatorChinaUnicom.KoreancellcoKTFdemonstratedearlierthisyeartheabilitytoroambetweenGSMandCDMAusingsuchcards.However,onlythecardcontainingtheuser’sservicedatacanroam-nottheCDMAhandsetortheuser’snumber(exceptviacallforwarding).
CDMA开发商一直致力于RUIM卡的开发,以赋予CDMA漫游的能力。
韩国手机制造企业KTF今年早些时候展示了使用此种卡在GSM和CDMA网络中漫游的功能,但是,只有包含用户服务数据的卡能够漫游,CDMA手机本身及用户号码则不能(除了通过呼叫转移)。
2.Programming(Mandatory)
a.Implementalinkedlistforintegers,whichsupportstheinsertafter(insertanodeafteraspecifiednode)andremoveafter(removethenodeafteraspecifiednode)methods;
intdata;
structLNode*next;
pLinkListm_pList;
//链首指针
intm_listLength;
//链表总长度
LinkList();
//构造函数
~LinkList();
//析构函数
boolInsertAfter(intafternode,intdata);
boolRemoveAfter(intremovenode);
voidsort();
//实现方法
LNode*pTemp=m_pList;
//先让指针变量pTemp指向第一个结点
intcurPos=-1;
if(afternode>
returnfalse;
while(pTemp!
curPos++;
if(curPos==afternode)
break;
pTemp=pTemp->
if(curPos!
LNode*newNode=newLNode;
newNode->
pTemp->
next