发布于 2014-10-12 09:00:52 | 237 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

中软国际

中软国际有限公司是国内大型综合性软件与信息服务企业,具有极高的市场感召力和客户忠诚度,以领先的技术、丰富的经验、精湛的服务在中国 IT 行业享有极高的声誉。自成立以来,中软国际取得了业界瞩目的成就,并作为国内第一家专注于电子政务领域的 IT 服务商,于 2003 年 6 月在香港联交所创业板成功上市。


一套中软国际的面度题,开发工程师类,e文的,有些有翻译,感兴趣的同学参考下.

题目1:一条小溪上7块石头,如图所示:(图就是下面的链接)

分别有六只青蛙:A,B,C,D,E,F。A,B,C三只蛙想去右岸,它们只会从左向右跳;D,E,F三只蛙想去左岸,它们只会从右向左跳。青蛙每次最多跳到自己前方第2块石头上。请问最少要跳几次所有青蛙上岸。写出步骤。

题目2:Which of the choices below correctly describes the amount of time used by the  following code:(下面那个选项正确地描述了代码运行的调度次数)
n=10;
for(i=1; i<n; i++)
   for(j=1; j<n; j+=n/2)
     for(k=1; k<n; k=2*k)
       x = x +1;
A Θ(n^3)  
B Θ(n2logn) 
C Θ(n(log n)2) 
D Θ(n log n) 
E Θ((logn)2) 

题目3:Give a one-line C expression to test whether a number is a power of?(这句话不知道咋翻译)
题目4:What is wrong with the following code?(下面代码哪错了)
  char *p;
  *p = malloc(10);

题目 5:Write a c++ function to take two sorted single linked lists as parameters and marge them into one then return it (Please write data structure first) (请写一个C++程序对两个排好序的单链表合成一个大的单链表)
  S1.1->4->5, S2:2->3->6, result="1->2->3->4->5->6"

题目6:Write a function to get the second maximum number in an integer array.(请写程序返回一个数组中第2大的数)
int getsecond(int a [])

题目7:Write a c++ program that will delete itself after execution.(写一个程序,该程序执行完后自己删除自己)

题目8:What is the difference between calloc and malloc?(calloc malloc区别是什么?)

题目9:what's wrong with the call fopen("c:\newdir\file dat"."r")?

题目10:A quad- tree, starting from the root node, could consist of many nodes: leaf- node and non-leaf node. Each non- leaf node may have 1 to 4 child nodes; each node has an internal value V, if not null, which would refer to any node in the same quad- tree. Hierarchically, depth of node describes the distance between a node in a tree and the tree’s root node, the farther the distance is, the deeper the node is at in the tree. The goal is to find all the nodes in the quad- tree which fulfills the condition: the value of node A refers to a node B in the same tree, where the depth of node A is larger than the depth of node B. The input would be a data structure representing the quad- tree; the output would be a data structure representing the list of nodes fulfilling the conditions. (四 叉树由许多个节点组成,其起点是根节点。节点有两种:叶子节点,非叶子节点,其中每个非叶子节点又可分出1到4个子节点。每一节点都包含其内在值V。如果 这个值非空,则可以表示同一四叉树上任一节点的值。从等级上划分,节点的深度表明节点与根节点之间的距离:距离越远,节点的深度越深。目的是找出四叉树上 所有符合以下条件的节点:在同一树上,节点A 的值引用节点B,但其深度要大于节点B的深度。输入的数据结构以四叉树形式呈现,输出的数据结构以链表呈 现)

Q1: Describe how you will solve the problem and explain why you pick the solution. The best answer should consider multiple solutions and choose the optimal one in terms of time and space complexity, and explain why you choose this one.  (Q1, 说明你如何解决这个问题并解释你为什么采取那种解决方式。最好的回答应是在多种解决方案中根据时空的复杂程度选择最佳的一种并解释你为什么选择该项)


Q2: Implement the solution you have chose in the previous question in any programming language. A function is required for the code you write so that others can call it. You should define the major data structures you are going to use in the function. (把 你在前一问题中选择的解决方法运用于任一程序语言中。要求你的函数具有一种功能,以便其他人能对调用它?你需要界定你将在这一函数中使用的主要数据结构)

Q3: Provide list sufficient test cases that can validate the code you write in Q2 working correctly as expected. The best answer should consider various typical cases for different usages by function callers, including common cases, boundary cases, error case, etc. (提供一组有效的测试用例证明你在问题2中的编码达到了预期目标。最好的回答应考虑到函数调用者,对不同类型实例的不同使用,这些实例包括普通实例,边缘 实例和错误实例等)



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务