Logos Technologies Interview Question
1 Interview Reviews |
Back to all Logos Technologies Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Development Intern at Logos Technologies:
Explain how you would keep a count of the most frequently occurring words in a text file too large to fit into memory.
| Tags: | programming, external sorting See more , See less 8 |
See more for this Logos Technologies Software Development Intern Interview
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
step1. map<string, int> word_count;
step2. divide large files to small pieces which could fit in memory,
step3. pass these small files to memory one by one , keep track of the frequencey of every
different word by word_count map.
suppose there are 0.1 million different words, average length of word is 10, it will take approximately 1 M space ,plus extra overhead memory, this map could easily fit in memory .....
Any advice ?
Helpful Answer?
Yes |
No
Inappropriate?
To comment on this
question,
Sign In with Facebook or
Sign Up
0 of 0 people found this helpful
by Interview Candidate: