Reviewer needed on human sensing, sensing system, image processing# Immigration - 落地生根
l*e
1 楼
刚刚在中offline coding test中挂了,比较郁闷。我把问题和我的code 贴出来,希望
大家给些指导意见。
题目是这样的:
有几个非常大的file,每个file里包括最多一个million的行,每一行是一个sentence
,比如:
The sky is blue.
She said "she is a good girl".
Don't put it into firewood!
要求是:
1. 读取和处理这些file,当处理完毕后,给出提示符 "query>",等待输入
2. 输入的是一个query sentence, 包括很多很多key words。输出的是那些file中的所
有行,这些行包括所有query sentence的key words。要求打印出 所在file的行数,行
的内容,和file的名字。
考察的重点是,如何efficiency的返回所有行。同时包括clean code,和corner case
的考虑。
题目要求必须2个小时做完, time的。
我费了九牛二虎之力,还是挂了。我把我的code上传
https://github.com/lsersime/oki/blob/master/test.cpp
new grad, 写得不好,平时刷leetcode,没顾及这种project,希望大家给些建设性意
见。
谢谢!
大家给些指导意见。
题目是这样的:
有几个非常大的file,每个file里包括最多一个million的行,每一行是一个sentence
,比如:
The sky is blue.
She said "she is a good girl".
Don't put it into firewood!
要求是:
1. 读取和处理这些file,当处理完毕后,给出提示符 "query>",等待输入
2. 输入的是一个query sentence, 包括很多很多key words。输出的是那些file中的所
有行,这些行包括所有query sentence的key words。要求打印出 所在file的行数,行
的内容,和file的名字。
考察的重点是,如何efficiency的返回所有行。同时包括clean code,和corner case
的考虑。
题目要求必须2个小时做完, time的。
我费了九牛二虎之力,还是挂了。我把我的code上传
https://github.com/lsersime/oki/blob/master/test.cpp
new grad, 写得不好,平时刷leetcode,没顾及这种project,希望大家给些建设性意
见。
谢谢!