有朋友的公司招程序员, 要特别强的。 附三道编程题目

来源: 乱弹 2009-05-07 18:15:58 [] [博客] [旧帖] [给我悄悄话] 本文已被阅读: 次 (753 bytes)
本文内容已被 [ 乱弹 ] 在 2009-05-08 16:14:52 编辑过。如有问题,请报告版主或论坛管理删除.
要求:

(1) 算法要比较好。
(2) C++ 掌握得很好, 写的程序既快且稳, 又好读。
(3) 英语要好, 交流能力强,能跟人合作得好。


公司文化很好,工资待遇比一般 IT 公司好很多,做得好的年终奖很丰厚。

编程题目:

(1) Write a program to send out a list of hotel rooms in a big hotel that are not cleaned every 1 minute. You can assume that every room will be only cleaned once a day. You need to write out the main algorithm or code.

(2)Write a function to print a number in binary form.
(3)Two large files contain sorted numbers. Merge these two files into a sorted file.


对此工作有兴趣的可以自己试试看,自己觉得不错的话,可以用悄悄话发给我,我发给朋友考察。真正的面试会很严格。


所有跟帖: 

我认识一位正找工作的高手,你介绍的公司在哪个CITY? -iask- 给 iask 发送悄悄话 iask 的博客首页 (0 bytes) () 05/08/2009 postreply 18:38:11

NYC. -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/08/2009 postreply 18:41:03

这几道题目主要是用于自测的。 题目一可以忽略。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (189 bytes) () 05/08/2009 postreply 19:01:58

谢谢老班长!现在程序员很多,但真正高强的C++程序员 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (215 bytes) () 05/08/2009 postreply 21:11:15

Looks like you are crazy about programming -贫论元- 给 贫论元 发送悄悄话 (0 bytes) () 05/11/2009 postreply 06:34:56

我认识一个C++高手,是个真正的高手。一次跟他聊起来好的程序员的话题。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (315 bytes) () 05/08/2009 postreply 22:00:40

我认为的software developer所应具备的: from jamesxu -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (1291 bytes) () 05/09/2009 postreply 08:05:40

说得很好。 理科基础这里是用算法来强调, 创造力和激情这些却不容易考察。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (102 bytes) () 05/09/2009 postreply 09:09:42

俺倒觉得,需求分析,也就是做什么最重要,然后是 -feicen- 给 feicen 发送悄悄话 (109 bytes) () 05/09/2009 postreply 16:51:55

Passion for find the best solution possible in a reasonable time -k19mliu- 给 k19mliu 发送悄悄话 k19mliu 的博客首页 (0 bytes) () 05/10/2009 postreply 00:30:53

能不能解答这个问题,当计算机更升换代后以前辛辛苦苦写的代码 -bsmile- 给 bsmile 发送悄悄话 (115 bytes) () 05/13/2009 postreply 19:03:15

计算机更升换代,人也得换代更升。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (252 bytes) () 05/14/2009 postreply 04:17:00

哈哈,去年的粮食今年都变大粪了,农民就不种地了? -liveincanada2- 给 liveincanada2 发送悄悄话 (576 bytes) () 10/15/2009 postreply 11:17:38

I happen to read this, hehe, thanks! -Jamesxu- 给 Jamesxu 发送悄悄话 (0 bytes) () 08/14/2009 postreply 07:53:16

这是不是你自己的考题 ? 想让人家帮你作? -iamhereforfun- 给 iamhereforfun 发送悄悄话 (12 bytes) () 05/09/2009 postreply 09:55:55

hehe,你过虑了:)。因为乱弹不是做C++的。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 10:22:39

his passion is stocks? -yma16- 给 yma16 发送悄悄话 yma16 的博客首页 (0 bytes) () 05/09/2009 postreply 19:00:08

hehe..u r funny:) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 19:26:41

第二题应该加上不能用判断和运算操作。 -what124- 给 what124 发送悄悄话 (0 bytes) () 05/09/2009 postreply 12:05:31

题目是比较开放性的。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/09/2009 postreply 12:20:52

回复:有朋友的公司招程序员, 要特别强的。 附三道编程题目 -hello2- 给 hello2 发送悄悄话 hello2 的博客首页 (274 bytes) () 05/09/2009 postreply 15:16:44

第三题是不是一个list,或栈就行了? -feicen- 给 feicen 发送悄悄话 (101 bytes) () 05/09/2009 postreply 16:42:02

或者不用list或栈,直接读文件,比较,然后写文件 -feicen- 给 feicen 发送悄悄话 (66 bytes) () 05/09/2009 postreply 16:58:57

回复:或者不用list或栈,直接读文件,比较,然后写文件 -hello2- 给 hello2 发送悄悄话 hello2 的博客首页 (69 bytes) () 05/09/2009 postreply 17:01:02

如果排序的话,那就太简单了,这个题是open的,是考实际问题解决 -feicen- 给 feicen 发送悄悄话 (83 bytes) () 05/09/2009 postreply 17:04:40

但我还是觉得是考排序:) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 17:34:54

meant to follow up with feicen. -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 17:36:42

考排序的话就不会说给的两个原文件是排好的了 -feicen- 给 feicen 发送悄悄话 (199 bytes) () 05/09/2009 postreply 17:48:13

hmm. makes sense. thanks. -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 17:59:21

回复:考排序的话就不会说给的两个原文件是排好的了 -hello2- 给 hello2 发送悄悄话 hello2 的博客首页 (99 bytes) () 05/09/2009 postreply 18:38:17

无论如何,我认为feicen给的算法是performance最好的:) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/10/2009 postreply 11:40:23

系统page时会不停移动数据块组合成大块内存---超级慢 -what124- 给 what124 发送悄悄话 (305 bytes) () 05/11/2009 postreply 05:26:51

同意你对算法的分析。跟feicent说的一致。关于女程序员的说法, -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (340 bytes) () 05/11/2009 postreply 07:01:35

第一题也没有完全弄懂,具体的要求功能,所以不好说 -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/09/2009 postreply 17:00:25

as I remember, binary, oct and hex are only -yma16- 给 yma16 发送悄悄话 yma16 的博客首页 (31 bytes) () 05/09/2009 postreply 19:04:29

for the 2nd one, 我的作业。(俺刚写的,还没调试:) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (362 bytes) () 05/09/2009 postreply 16:20:58

<0 呢? -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/09/2009 postreply 16:31:33

最好使用>>1和&运算符,不过小数不太清楚 -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/09/2009 postreply 16:44:49

不过所有数既然都是二进制存储,那么用>> &得到的应该就是他的二进制 -feicen- 给 feicen 发送悄悄话 (39 bytes) () 05/09/2009 postreply 17:19:21

wow! -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 17:32:26

只是0和1,用内存指针直接memcpy ASCII 码就可以得到string,不用比较 -what124- 给 what124 发送悄悄话 (0 bytes) () 05/11/2009 postreply 05:36:12

那1000000000000000000000行吗? -Windows8- 给 Windows8 发送悄悄话 (0 bytes) () 05/28/2009 postreply 11:12:02

第一题说明 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (233 bytes) () 05/09/2009 postreply 17:15:29

还是这个难阿。水平很差,想不到好办法 -feicen- 给 feicen 发送悄悄话 (296 bytes) () 05/09/2009 postreply 17:42:01

你功底蛮好的。这个 map 可以认为是每天早上建立的,这样就简单了。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/09/2009 postreply 17:44:28

回复:第一题说明 -GoldIsGold- 给 GoldIsGold 发送悄悄话 (165 bytes) () 05/09/2009 postreply 17:52:05

不错不错。 -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/09/2009 postreply 17:54:16

能否详细说明一下,或者给出伪代码?学习学习 -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/09/2009 postreply 17:56:43

回复:能否详细说明一下,或者给出伪代码?学习学习 -GoldIsGold- 给 GoldIsGold 发送悄悄话 (449 bytes) () 05/09/2009 postreply 18:28:15

有待仔细考虑。尤其是对"big hotel"的case,有huge number of rooms. -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (66 bytes) () 05/10/2009 postreply 11:48:07

楼上2位好厉害!PF:)。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/09/2009 postreply 17:58:30

yeah, this is good -hello2- 给 hello2 发送悄悄话 hello2 的博客首页 (0 bytes) () 05/09/2009 postreply 18:40:40

回复:回复:第一题说明 -spear123- 给 spear123 发送悄悄话 (216 bytes) () 05/10/2009 postreply 18:06:06

能给个具体的算法吗?(或是map,或是array都可以) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/10/2009 postreply 11:43:24

Just a sample -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (499 bytes) () 05/10/2009 postreply 12:37:42

need to add "++iter" in the second case -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/10/2009 postreply 12:39:09

xiexie. -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/10/2009 postreply 13:59:08

这么简单的玩意,看来计算机里的确没人啊 -botong- 给 botong 发送悄悄话 botong 的博客首页 (0 bytes) () 05/10/2009 postreply 16:44:04

计算机里怎么会有真人呢?那里面全是数字:)。莫非你 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (22 bytes) () 05/10/2009 postreply 17:10:29

这是自测用的。如果感觉好,可走下一步。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/10/2009 postreply 17:14:50

Dirty rooms -deal_or_no_deal- 给 deal_or_no_deal 发送悄悄话 (918 bytes) () 05/10/2009 postreply 19:24:30

哈哈,以为是骂人呢。 -贫论元- 给 贫论元 发送悄悄话 (0 bytes) () 05/11/2009 postreply 06:10:33

难得见到自己专业相关的 -累死算了- 给 累死算了 发送悄悄话 (637 bytes) () 05/12/2009 postreply 11:10:04

C++不会死掉的.也没有死掉,不知道你从什么判断的? -feicen- 给 feicen 发送悄悄话 (0 bytes) () 05/12/2009 postreply 18:25:42

我也不太晓得你的判断依据,不过我先说好了 -累死算了- 给 累死算了 发送悄悄话 (1497 bytes) () 05/12/2009 postreply 19:01:33

你说得似乎都在点子上, 应该是高手。 我不太写程序。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/12/2009 postreply 19:22:59

你说的很好。一看就知道是个高手。可是,尽管 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (233 bytes) () 05/12/2009 postreply 20:24:43

说明一下,我不崇尚C++。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/12/2009 postreply 20:29:27

感谢两位花时间看我的闲话 -累死算了- 给 累死算了 发送悄悄话 (758 bytes) () 05/13/2009 postreply 10:52:51

你的闲话,让我这个连菜鸟都不如的草包子很受启发。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (252 bytes) () 05/13/2009 postreply 12:58:57

很多都说不上是我自己的话 -累死算了- 给 累死算了 发送悄悄话 (0 bytes) () 05/13/2009 postreply 18:26:31

上个帖子不小心发空了 -累死算了- 给 累死算了 发送悄悄话 (246 bytes) () 05/13/2009 postreply 18:29:28

thanks a lot. -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/14/2009 postreply 04:07:23

才发现有字似乎被滤掉了 -累死算了- 给 累死算了 发送悄悄话 (63 bytes) () 05/13/2009 postreply 21:12:53

回复:我也不太晓得你的判断依据,不过我先说好了 -我爱C++- 给 我爱C++ 发送悄悄话 (227 bytes) () 05/13/2009 postreply 16:21:15

我认为你举的例子还是有些历史原因 -累死算了- 给 累死算了 发送悄悄话 (203 bytes) () 05/13/2009 postreply 18:47:33

纯属讨论 -我爱C++- 给 我爱C++ 发送悄悄话 (1230 bytes) () 05/14/2009 postreply 10:44:45

我们展开来讨论一下 -累死算了- 给 累死算了 发送悄悄话 (2325 bytes) () 05/14/2009 postreply 17:40:55

可以开个主贴讨论。蛮有意思的。 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (0 bytes) () 05/14/2009 postreply 18:23:30

毕竟不是专门板块,回帖里灌灌水没什么,开主贴就不合适了 -累死算了- 给 累死算了 发送悄悄话 (0 bytes) () 05/14/2009 postreply 18:25:42

I highly recommend u make a new thread -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (234 bytes) () 05/14/2009 postreply 18:53:09

不过,现在的职坛跟以前不大一样了:失业的人太多了。讨论技术的话题少了。。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (128 bytes) () 05/14/2009 postreply 19:00:20

typo: 不敢 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 05/14/2009 postreply 19:04:06

回复:我们展开来讨论一下 -我爱C++- 给 我爱C++ 发送悄悄话 (1058 bytes) () 05/14/2009 postreply 21:39:02

我也说着玩吧:)。一个产品的存在与否,最终要由市场说的算。 -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (678 bytes) () 05/15/2009 postreply 04:56:20

傻鸟, 做应用出身的吧. -scim- 给 scim 发送悄悄话 (64 bytes) () 05/13/2009 postreply 10:52:39

你大概还什么都没做过吧? -累死算了- 给 累死算了 发送悄悄话 (31 bytes) () 05/13/2009 postreply 10:54:22

不好意思说反了. 标题. -scim- 给 scim 发送悄悄话 (0 bytes) () 05/13/2009 postreply 10:55:25

不好意思标题说反了. -scim- 给 scim 发送悄悄话 (57 bytes) () 05/13/2009 postreply 10:54:58

这种考题就是骗人家的CODE. -傻傻子- 给 傻傻子 发送悄悄话 傻傻子 的博客首页 (0 bytes) () 05/13/2009 postreply 21:54:58

第三题, FileMapping -灵魂附体- 给 灵魂附体 发送悄悄话 灵魂附体 的博客首页 (0 bytes) () 05/14/2009 postreply 21:53:54

回复:有朋友的公司招程序员, 要特别强的。 附三道编程题目 -东瓜太郎- 给 东瓜太郎 发送悄悄话 (840 bytes) () 07/22/2009 postreply 23:42:08

for 2, there's a much simpler way -Jamesxu- 给 Jamesxu 发送悄悄话 (14 bytes) () 08/14/2009 postreply 08:04:07

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”