高手来做做中软国际面试题

hyj1984 hyj1984 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
题目1:一条小溪上7块石头,如图所示:(图就是下面的链接)
http://album.hi.csdn.net/app_uploads/jinder22/20081220/235450716.p.jpg?d=20081220235510403




分别有六只青蛙: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中的编码达到了预期目标。最好的回答应考虑到函数调用者,对不同类型实例的不同使用,这些实例包括普通实例,边缘实例和错误实例等)

...全文

相关推荐

中软国际面试题.doc

【中软国际面试题解析】在中软国际的面试中,Java编程能力是重点考察的技能之一。以下是一些基于给定题目所涉及的Java知识点的详细解释:1.

zhoufmtry

【毕业求职季】-听说你想去大厂看学姐,带你看看腾讯CSIG产品策划实习面经

【一面】 Q1:自我介绍 Q2:介绍一下你的调研项目 Q3:你们为什么要做这个调研产品? Q4: 你们的调研产品跟竞品的区别及你们产品的优势? Q5:你们的产品是如何触达用户的? Q6:目前平台的用户数量是多少? Q7:平台是怎么盈利的? Q8:你对医疗产品的了解度?通过什么渠道了解? Q9:介绍一个你喜欢的产品? Q10:跟同类竞品对比的优缺点? Q11:你之前是项目经历中同时有To B和To C,你认为两者的区别及在To B用户需求方面遇到的问题有哪些? Q12:你觉得自己更擅.

文宇肃然

中软国际Java面试题

这份文档“中软国际Java面试题@www.java1234.com.doc”可能会涵盖从基础概念到高级特性的各种问题,帮助求职者提升自己的技能并顺利通过面试。

java1234_小锋

中软国际开发人员的笔试面试题

《中软国际开发人员笔试面试题解析》中软国际作为国内知名的IT企业,其对开发人员的技术能力和综合素质要求颇高。

maomao871028

中软国际Java笔试题 面试题

中软国际作为一家知名的IT服务公司,其Java笔试题和面试题往往涵盖了Java语言的核心概念、框架、设计模式以及实际开发中的问题解决能力。下面我们将深入探讨这些知识点。

ZZZLLLHHH
评论 16
收藏 已收藏
分享
返回顶部
hyj1984
C# 111,128 成员 642,536 内容