我上周接受了采访.我被困在算法轮中的一个问题.我回答了这个问题,但面试官似乎并不相信.这就是我分享同样的原因.
请告诉我这个问题的任何优化方法,以便在将来的采访中帮助我.
题 :-
There are 20 text files given,all files are ASCII text files,having
size less than 10^9 bytes. There is one input also given,this is
also one ASCII file,say,input.txt.Our task is to strategically match the content of this input file with
given 20 files,and print the name of closest matching file. The
contents of input file might only match partially
提前致谢.寻找你的回复.
解决方法
区分它们并通过wc -l,或在C中实现
Levenshtein distance,将每一行视为单个字符(或者包含主题域的任何更合适的单位)