目前本站已有 十几万 份求职资料啦!


百度2017年校园招聘软件测试笔试题

05-13 15:26:23 来源:http://www.qz26.com 笔试题目   阅读:8424
导读:1、 简答题。 请说出树的深度优先、广度优先遍历算法,及非递归实现的特点。2、 找错struct complex_t{ int real; int imag;}int create(complex_t*p,unsigned int n){ p=new complex_t[n]; if(p==NULL){return -1;}return 0;} int compute(){ //implement complex_t*comps; unsigned int num=0; cin>>num; if(create(comps,num)=0){ cerr<<”create comps failes!”< return n-1;}long long int sum=0;unsigned int pos=0;cin>>pos;while(pos<cin>>comps[po
百度2017年校园招聘软件测试笔试题,标签:银行笔试题目,企业笔试题目,http://www.qz26.com

1、  简答题。 请说出树的深度优先、广度优先遍历算法,及非递归实现的特点。

2、  找错

struct complex_t

{

   int real;

   int imag;

}

int create(complex_t*p,unsigned int n)

{

   p=new complex_t[n];
   if(p==NULL){
return -1;

}

return 0;

}

    int compute()

{

   //implement

   complex_t*comps;

   unsigned int num=0;

   cin>>num;

   if(create(comps,num)=0){

      cerr<<”create comps failes!”<

     return n-1;

}

long long int sum=0;

unsigned int pos=0;

cin>>pos;

while(pos<

cin>>comps[pos].real>>comps[pos].imag;

sum+=comps[pos].real*comps[pos+1].real+comps[pos].imag*comps[pos+1].imag;

pos+=2;

}

cout<<”sum is”<
www.qz26.com
return 0;

}

第二部分 程序与算法

1、  一个典型的大型项目,通常由众多组件构成,这些组件之间复杂的编译依赖于在构建整个系统时,是最让人头疼的地方之一。现在就有这样的一个大型项目,由N(N>1000)个组件构成,每个组件都是可以编译的,但组件之间存在着编译依赖,如组件N1依赖N2,即编译N1时N2必须已经先编译完成,否则N1不能完成编译,但组件之间没有循环依赖的问题。请设计一种快速算法,能完成整个项目的编译构建过程,并给出算法的时间复杂度。

2、  实现一个函数的完整代码。

int maxContinuNum(const char*inputstr.char*outputstr)

功能:

在以‘\0’结尾的字符串中找出连续最长的数字串,并把这个串的长度返回,并把这个最长数字串付给其中一个函数参数outputstr所指内存。不能用strlen之类的库函数。


Tag:笔试题目银行笔试题目,企业笔试题目求职笔试面试 - 笔试题目
【字号: 】 【打印】 【关闭
最新更新
推荐热门
联系我们 | 网站地图 | 财务资料 | 范文大全 | 求职简历 | 财会考试 | 成功励志
Copyright 二六求职资料网 All Right Reserved.
1 2 3 4 5 6 7 8 9 10