精華區beta Oversea_Job 關於我們 聯絡資訊
因為之前在blog上有提過跟Ask.com面試, 前兩天剛好有不認識的學弟找我要題目, 如果有打算跟Edison, NJ那邊的Ask.com(TEOMA)面試的話就參考一下, 題目要用C++。 有興趣的網友可以一起討論看看題目要怎麼解決, 我可以把data file再寄給你。 You are given two files: data.txt and input.txt. The data.txt records two kinds of information: site and page. Their formats are defined as follows. The “site” includes the following fields: Site ID: Name: Desc: Length of Desc: HomepageURL: FeedURL: Email: The “page” includes the following fields: Item ID: Site ID: Title: Desc: Length of Desc: Summary: Length of Summary: Author: Subject: Created: Updated: EnclosureURl: EnclosureType: GUIDType: GUID: ‧ The Site ID and Item ID fields are integers. Each Site ID represents a unique Web site while an Item ID is matched to a unique Web page. ‧ The Created field is an integer number starting from epoch. ‧ The Length of Desc, Length of Summary, Updated, GUIDType fields are integers. ‧ GUID is always NULL. ‧ All the rest fields are strings with unknown lengths. Both “site” and “page” records in data.txt are not sorted. You should not assume the page records with the same site ID are placed after the correspondent site record. The input.txt contains Site IDs followed by Item IDs. Although the item IDs always follow a Site ID, they are not sorted in order. The Site IDs are not sorted either. Task: The task is to match the Site ID, Item ID pairs in this file with date file and pull out the following fields and put them in a file. The “site” information should include: Site ID: Name: HomepageURL: Email: The “page” information should include: Item ID: Site ID: Title: Author: Subject: Created: Requirements: ‧ The output “site” and “page” information should be sorted. All pages within the same site should be placed after the site. ‧ The Created field should be converted to human readable format. ‧ Please print out the total time used for the program. ‧ It is NOT required to use the client-server model. But if you have enough time, you can consider it to gain additional credits. (The client reads input.txt and sends requests to server, which reads data.txt.) General Tips: 1 You can write the code in C++ with Makefile. 2 The possible exceptions should be considered. The algorithm should work for very large data too (e.g. larger than 2 GB). 3 Design your code to minimize both CPU and memory cost. We will evaluate the program by two metrics: correctness and efficiency. 4 Please write a Readme file containing description of your program design, assumptions made (including its justification, if needed) and sample input/output. 5 Elegant design and code carries. 6 You can look up resources from the internet, but please refrain from copying code. -- Je t'aime,o capitale infame. Tu m'as donne ta boue et j'en ai fait de l'or. Charles Baudelaire 1821-67 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 24.4.216.127
shaopin:超棒 雖然我一題都還沒開始細看但我覺得很興奮 07/14 15:24
duer:只有一題啦 XD 07/14 15:35