由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 贡献一道面试题
相关主题
谁会做>??????????????????????????????????????提供Opentable内推
没人讨论热门帖子里的两道概率题?NYC Hedge Fund Junior Developer Opening
T家店面ETL QA-contractor
Network engineer position@large company@RTP NC (转载)怎样优化代码的 error handling, re-usability, readability, testability, and OOP?
感谢大家祝福,收到口头offerGoogle给了onsite, 为什么是指定组的?
Mountain view招个developer王垠测试的道理写的不错呀
Electrical Design Engineer opportunity in San diego (Carlsbad area)Interview Question
快绝望了GOOGLE 电面面经
相关话题的讨论汇总
话题: word话题: mcmurdo话题: station话题: states话题: antarctica
进入JobHunting版参与讨论
1 (共1页)
m*****k
发帖数: 731
1
Please read all the instructions before you start writing the code for this
programming exercise. You have 1-hour to submit your solution (so please
keep track of your time).
(Exercise)
Write a program to read a file and
a) print the number of occurrences of each word
b) print the largest word that starts and ends with the same character.
(Notes)
Anything that is separated by space - “ “ should be treated as a word.
Fullstops - “.” do not count as a part of the word and don’t qualify as a
word to be counted as separately.
(How to approach the problem)
Do not worry about the code syntax, we know this is a free text editor
Do not copy paste from any place outside of this test browser window, we
want to see how you approach the problem
If something is unclear, write your assumption as a part of the code
comments so that it doesn't stop you from finishing this assignment.
Using the right approach is more important than finishing the code (Write
clean, well designed, testable, efficient code)
Use any programming language you like (we prefer if you use java)
(Eg)
Data.txt:
McMurdo Station is a U.S. Antarctic research center on the south tip of Ross
Island, which is in the New Zealand claimed Ross Dependency on the shore of
McMurdo Sound in Antarctica. It is operated by the United States through
the United States Antarctic Program, a branch of the National Science
Foundation. The station is the largest community in Antarctica, capable of
supporting up to 1,258 residents,[1] and serves as the United States
Antarctic science facility. All personnel and cargo going to or coming from
Amundsen–Scott South Pole Station first pass through McMurdo.
Result:
Word -> Count
---------------
McMurdo -> 2
station -> 3
is -> 5
….
….
Longest word that ends and starts with the same character:
------------------------------------------------------------
Antarctica
1 (共1页)
进入JobHunting版参与讨论
相关主题
GOOGLE 电面面经感谢大家祝福,收到口头offer
Is this a DP problem?Mountain view招个developer
randomized quick sort的最坏情况时间复杂度Electrical Design Engineer opportunity in San diego (Carlsbad area)
MS sdet面经 + bloomberg电面面经快绝望了
谁会做>??????????????????????????????????????提供Opentable内推
没人讨论热门帖子里的两道概率题?NYC Hedge Fund Junior Developer Opening
T家店面ETL QA-contractor
Network engineer position@large company@RTP NC (转载)怎样优化代码的 error handling, re-usability, readability, testability, and OOP?
相关话题的讨论汇总
话题: word话题: mcmurdo话题: station话题: states话题: antarctica