有朋友的公司招程序員, 要特別強的。 附三道編程題目

來源: 亂彈 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

加跟帖:

當前帖子已經過期歸檔,不能加跟帖!